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:
parent
7158a50b7a
commit
9cd4aa70ba
11
.github/workflows/auto-analyze.yml
vendored
11
.github/workflows/auto-analyze.yml
vendored
@ -13,25 +13,22 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
|
||||||
|
|
||||||
- name: Check package.json was changed
|
- name: Check package.json was changed
|
||||||
id: changed-file-package-json
|
id: changed-file-package-json
|
||||||
uses: tj-actions/changed-files@v41
|
uses: tj-actions/changed-files@v46
|
||||||
with:
|
with:
|
||||||
sha: ${{ github.event.pull_request.head.sha }}
|
files: 'package.json'
|
||||||
|
|
||||||
- name: Install node
|
- name: Install node
|
||||||
uses: actions/setup-node@v4
|
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:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
|
|
||||||
- uses: preactjs/compressed-size-action@v2
|
- 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:
|
with:
|
||||||
strip-hash: "\\b\\w{8}\\."
|
strip-hash: "\\b\\w{8}\\."
|
||||||
pattern: './dist/**/*.{js,css,html,json,woff2,svg,png}'
|
pattern: './dist/**/*.{js,css,html,json,woff2,svg,png}'
|
||||||
|
11
.github/workflows/check_locale.yml
vendored
11
.github/workflows/check_locale.yml
vendored
@ -14,12 +14,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Fetch repo
|
- name: Fetch repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
|
||||||
|
|
||||||
- name: Install node
|
- name: Install node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
|
|
||||||
@ -28,9 +25,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v41
|
uses: tj-actions/changed-files@v46
|
||||||
with:
|
with:
|
||||||
sha: ${{ github.event.pull_request.head.sha }}
|
|
||||||
files: 'src/locales/*.json'
|
files: 'src/locales/*.json'
|
||||||
|
|
||||||
- name: Run i18n-extract on changed locale files
|
- name: Run i18n-extract on changed locale files
|
||||||
@ -46,7 +42,7 @@ jobs:
|
|||||||
echo "$file=|${file##*/}|${MISSING}|${UNUSED}|" >> $GITHUB_OUTPUT
|
echo "$file=|${file##*/}|${MISSING}|${UNUSED}|" >> $GITHUB_OUTPUT
|
||||||
done
|
done
|
||||||
- name: Comment PR
|
- name: Comment PR
|
||||||
uses: thollander/actions-comment-pull-request@v2
|
uses: thollander/actions-comment-pull-request@v3
|
||||||
with:
|
with:
|
||||||
message: |
|
message: |
|
||||||
Language file analysis report:
|
Language file analysis report:
|
||||||
@ -54,4 +50,3 @@ jobs:
|
|||||||
|:---|---:|---:|
|
|:---|---:|---:|
|
||||||
${{join(steps.i18n-extract.outputs.*, '
|
${{join(steps.i18n-extract.outputs.*, '
|
||||||
')}}
|
')}}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user