Skip to content

Commit 2027215

Browse files
authored
fix(ci): use dorny/paths-filter to check modified files (#879)
* fix(ci): use dorny/paths-filter to check modified files tj-actions/changed-files have been compromised: https://semgrep.dev/blog/2025/popular-github-action-tj-actionschanged-files-is-compromised/ * fix ci
1 parent ff52add commit 2027215

File tree

6 files changed

+31
-16
lines changed

6 files changed

+31
-16
lines changed

.github/workflows/audit.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ jobs:
4141
runs-on: ubuntu-latest
4242
steps:
4343
- uses: actions/checkout@v3
44-
- run: corepack enable
44+
- run: |
45+
npm i -g --force corepack
46+
corepack enable
4547
- name: Setup node
4648
uses: actions/setup-node@v4
4749
with:

.github/workflows/covector-version-or-publish.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ jobs:
2525
with:
2626
fetch-depth: 0
2727

28-
- run: corepack enable
28+
- run: |
29+
npm i -g --force corepack
30+
corepack enable
2931
- name: Setup node
3032
uses: actions/setup-node@v4
3133
with:

.github/workflows/fmt.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ jobs:
3030

3131
steps:
3232
- uses: actions/checkout@v3
33-
- run: corepack enable
33+
- run: |
34+
npm i -g --force corepack
35+
corepack enable
3436
- name: Setup node
3537
uses: actions/setup-node@v4
3638
with:

.github/workflows/publish-binaries.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
if: ${{ matrix.settings.target == 'aarch64-unknown-linux-musl' }}
8585
8686
- name: upload artifact
87-
uses: actions/upload-artifact@v3
87+
uses: actions/upload-artifact@v4
8888
with:
8989
name: "${{ matrix.settings.target }}"
9090
path: target/${{ matrix.settings.target }}/release/cargo-create-tauri-app${{ matrix.settings.ext }}
@@ -98,7 +98,7 @@ jobs:
9898
- uses: actions/checkout@v3
9999

100100
- name: download all artifacts
101-
uses: actions/download-artifact@v3
101+
uses: actions/download-artifact@v4
102102
with:
103103
path: binaries
104104

.github/workflows/publish-napi.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ jobs:
7373
runs-on: ${{ matrix.settings.host }}
7474
steps:
7575
- uses: actions/checkout@v4
76-
- run: corepack enable
76+
- run: |
77+
npm i -g --force corepack
78+
corepack enable
7779
- name: Setup node
7880
uses: actions/setup-node@v4
7981
if: ${{ !matrix.settings.docker }}
@@ -154,7 +156,9 @@ jobs:
154156
working-directory: node
155157
steps:
156158
- uses: actions/checkout@v4
157-
- run: corepack enable
159+
- run: |
160+
npm i -g --force corepack
161+
corepack enable
158162
- name: Setup node
159163
uses: actions/setup-node@v4
160164
with:
@@ -194,7 +198,9 @@ jobs:
194198
working-directory: node
195199
steps:
196200
- uses: actions/checkout@v3
197-
- run: corepack enable
201+
- run: |
202+
npm i -g --force corepack
203+
corepack enable
198204
- name: Setup node
199205
uses: actions/setup-node@v4
200206
with:

.github/workflows/templates-test.yml

+11-8
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,19 @@ jobs:
3131
steps:
3232
- uses: actions/checkout@v3
3333

34-
- name: Get changed files
34+
- uses: dorny/paths-filter@v3
3535
id: changed-files
36-
uses: tj-actions/changed-files@v42
3736
with:
38-
base_sha: ${{ github.event.pull_request.base.sha }}
39-
separator: ","
37+
list-files: shell
38+
filters: |
39+
modified:
40+
- modified: '**'
4041
4142
- name: set matrix
4243
id: set-matrix
4344
shell: bash
4445
run: |
45-
OUT="$(node .scripts/generate-templates-matrix.js '${{ github.event_name }}' '${{ steps.changed-files.outputs.all_changed_files }}')"
46+
OUT="$(node .scripts/generate-templates-matrix.js '${{ github.event_name }}' '${{ steps.changed-files.outputs.modified_files }}')"
4647
echo "matrix=$OUT" >> $GITHUB_OUTPUT
4748
4849
build-cli:
@@ -57,7 +58,7 @@ jobs:
5758
run: tar -rf create-tauri-app.tar target/release/cargo-create-tauri-app
5859

5960
- name: upload cli artifact
60-
uses: actions/upload-artifact@v3
61+
uses: actions/upload-artifact@v4
6162
with:
6263
name: create-tauri-app
6364
path: create-tauri-app.tar
@@ -85,7 +86,9 @@ jobs:
8586
with:
8687
deno-version: v2.x
8788

88-
- run: corepack enable
89+
- run: |
90+
npm i -g --force corepack
91+
corepack enable
8992
if: matrix.settings.node
9093
9194
- name: Install Node.js@18
@@ -130,7 +133,7 @@ jobs:
130133
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.1 libayatana-appindicator3-dev librsvg2-dev patchelf
131134
132135
- name: download cli artifact
133-
uses: actions/download-artifact@v3
136+
uses: actions/download-artifact@v4
134137

135138
- run: tar -xf create-tauri-app/create-tauri-app.tar
136139

0 commit comments

Comments
 (0)