Skip to content

Commit 60c9f88

Browse files
authored
Remove tj-actions/changed-files (#559)
The compromised version never ran here, but we'll move off this.
1 parent 2e0477b commit 60c9f88

File tree

3 files changed

+36
-21
lines changed

3 files changed

+36
-21
lines changed

.github/workflows/linux.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,11 @@ jobs:
130130
matrix-0: ${{ steps.set-matrix.outputs.matrix-0 }}
131131
matrix-1: ${{ steps.set-matrix.outputs.matrix-1 }}
132132
any_builds: ${{ steps.set-matrix.outputs.any_builds }}
133-
pythonbuild_changed: ${{ steps.changed.outputs.pythonbuild_any_changed }}
133+
pythonbuild_changed: ${{ steps.check-pythonbuild.outputs.changed }}
134134
steps:
135135
- uses: actions/checkout@v4
136+
with:
137+
fetch-depth: 0 # fetch history for subsequent `git diff`
136138

137139
- name: Set up Python
138140
uses: astral-sh/setup-uv@v4
@@ -167,12 +169,15 @@ jobs:
167169
echo "any_builds=false" >> $GITHUB_OUTPUT
168170
fi
169171
170-
- uses: tj-actions/changed-files@v45
171-
id: changed
172-
with:
173-
files_yaml: |
174-
pythonbuild:
175-
- "src/*.rs"
172+
- name: Check if the `pythonbuild` crate changed
173+
id: check-pythonbuild
174+
run: |
175+
if git diff --quiet ${{ github.event.pull_request.base.sha || 'origin/main' }}...HEAD -- ':src/*.rs'; then
176+
echo "changed=false" >> "$GITHUB_OUTPUT"
177+
else
178+
echo "changed=true" >> "$GITHUB_OUTPUT"
179+
fi
180+
176181
177182
build-0:
178183
needs:

.github/workflows/macos.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ jobs:
4848
outputs:
4949
matrix: ${{ steps.set-matrix.outputs.matrix }}
5050
any_builds: ${{ steps.set-matrix.outputs.any_builds }}
51-
pythonbuild_changed: ${{ steps.changed.outputs.pythonbuild_any_changed }}
51+
pythonbuild_changed: ${{ steps.check-pythonbuild.outputs.changed }}
5252
steps:
5353
- uses: actions/checkout@v4
54+
with:
55+
fetch-depth: 0 # fetch history for subsequent `git diff`
5456

5557
- name: Set up Python
5658
uses: astral-sh/setup-uv@v4
@@ -77,12 +79,14 @@ jobs:
7779
echo "any_builds=false" >> $GITHUB_OUTPUT
7880
fi
7981
80-
- uses: tj-actions/changed-files@v45
81-
id: changed
82-
with:
83-
files_yaml: |
84-
pythonbuild:
85-
- "src/*.rs"
82+
- name: Check if the `pythonbuild` crate changed
83+
id: check-pythonbuild
84+
run: |
85+
if git diff --quiet ${{ github.event.pull_request.base.sha || 'origin/main' }}...HEAD -- ':src/*.rs'; then
86+
echo "changed=false" >> "$GITHUB_OUTPUT"
87+
else
88+
echo "changed=true" >> "$GITHUB_OUTPUT"
89+
fi
8690
build:
8791
needs:
8892
- generate-matrix

.github/workflows/windows.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ jobs:
4848
outputs:
4949
matrix: ${{ steps.set-matrix.outputs.matrix }}
5050
any_builds: ${{ steps.set-matrix.outputs.any_builds }}
51-
pythonbuild_changed: ${{ steps.changed.outputs.pythonbuild_any_changed }}
51+
pythonbuild_changed: ${{ steps.check-pythonbuild.outputs.changed }}
5252
steps:
5353
- uses: actions/checkout@v4
54+
with:
55+
fetch-depth: 0 # fetch history for subsequent `git diff`
5456

5557
- name: Set up Python
5658
uses: astral-sh/setup-uv@v4
@@ -77,12 +79,16 @@ jobs:
7779
echo "any_builds=false" >> $GITHUB_OUTPUT
7880
fi
7981
80-
- uses: tj-actions/changed-files@v45
81-
id: changed
82-
with:
83-
files_yaml: |
84-
pythonbuild:
85-
- "src/*.rs"
82+
83+
- name: Check if the `pythonbuild` crate changed
84+
id: check-pythonbuild
85+
shell: bash
86+
run: |
87+
if git diff --quiet ${{ github.event.pull_request.base.sha || 'origin/main' }}...HEAD -- ':src/*.rs'; then
88+
echo "changed=false" >> "$GITHUB_OUTPUT"
89+
else
90+
echo "changed=true" >> "$GITHUB_OUTPUT"
91+
fi
8692
8793
build:
8894
needs:

0 commit comments

Comments
 (0)