Skip to content

Commit 74a29f0

Browse files
authored
fix: Use git to derive changed files instead (rackerlabs#903)
tj-actions is no longer recommended CVE-2025-30066
1 parent ba20004 commit 74a29f0

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/pre-commit.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,17 @@ jobs:
1616
uses: actions/setup-python@v2
1717
with:
1818
python-version: ${{ matrix.python-version }}
19-
- name: Get changed files
19+
- name: Fetch all branches and tags
20+
run: git fetch --prune --unshallow
21+
- name: Determine changed files
2022
id: changed-files
21-
uses: tj-actions/[email protected]
23+
run: |
24+
CHANGED_FILES=$(git diff --name-only HEAD^ | xargs)
25+
echo "Changed files: $CHANGED_FILES"
26+
echo "CHANGED_FILES=$CHANGED_FILES" >> $GITHUB_ENV
2227
- name: Run Check
2328
uses: pre-commit/[email protected]
2429
with:
2530
extra_args: >-
26-
--files ${{ steps.changed-files.outputs.all_changed_files }}
31+
--files ${{ env.CHANGED_FILES }}
2732
--hook-stage manual

0 commit comments

Comments
 (0)