ci: update tj-actions/changed-files action in workflows (#2166)

* ci: update tj-actions/changed-files action

Signed-off-by: Stefan Dej <meteyou@gmail.com>

* ci: update tj-actions/changed-files action

Signed-off-by: Stefan Dej <meteyou@gmail.com>

---------

Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
Stefan Dej 2025-03-16 19:43:02 +01:00 committed by GitHub
parent 7158a50b7a
commit 9cd4aa70ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 15 deletions

View File

@ -13,25 +13,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Check package.json was changed
id: changed-file-package-json
uses: tj-actions/changed-files@v41
uses: tj-actions/changed-files@v46
with:
sha: ${{ github.event.pull_request.head.sha }}
files: 'package.json'
- name: Install node
uses: actions/setup-node@v4
if: contains(steps.changed-file-package-json.outputs.modified_files, 'package.json')
if: steps.changed-file-package-json.outputs.any_modified == 'true'
with:
node-version: 20
cache: 'npm'
- uses: preactjs/compressed-size-action@v2
if: contains(steps.changed-file-package-json.outputs.modified_files, 'package.json')
if: steps.changed-file-package-json.outputs.any_modified == 'true'
with:
strip-hash: "\\b\\w{8}\\."
pattern: './dist/**/*.{js,css,html,json,woff2,svg,png}'

View File

@ -14,12 +14,9 @@ jobs:
- name: Fetch repo
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Install node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
@ -28,9 +25,8 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
uses: tj-actions/changed-files@v46
with:
sha: ${{ github.event.pull_request.head.sha }}
files: 'src/locales/*.json'
- name: Run i18n-extract on changed locale files
@ -46,7 +42,7 @@ jobs:
echo "$file=|${file##*/}|${MISSING}|${UNUSED}|" >> $GITHUB_OUTPUT
done
- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
uses: thollander/actions-comment-pull-request@v3
with:
message: |
Language file analysis report:
@ -54,4 +50,3 @@ jobs:
|:---|---:|---:|
${{join(steps.i18n-extract.outputs.*, '
')}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}