Skip to content

Commit 5db7a25

Browse files
cdlearycodex
andauthored
Pin pre-commit cache action explicitly (#1052)
Replace the pre-commit composite action with equivalent explicit steps so the nested actions/cache dependency is pinned directly. Co-authored-by: Codex <noreply@openai.com>
1 parent ad6c2de commit 5db7a25

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,18 @@ jobs:
1616
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
1717
# actions/setup-python v6
1818
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
19-
# pre-commit/action v3.0.1
20-
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd
19+
- name: Install pre-commit
20+
run: python -m pip install pre-commit
21+
- name: Show installed Python packages
22+
run: python -m pip freeze --local
23+
- name: Cache pre-commit environments
24+
# actions/cache v4.3.0
25+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
26+
with:
27+
path: ~/.cache/pre-commit
28+
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
29+
- name: Run pre-commit
30+
run: pre-commit run --show-diff-on-failure --color=always --all-files
2131

2232
# Run bazel build and tests in order in one job to avoid parallel jobs that make
2333
# build logs appear out of sequence across the CI workflow.

0 commit comments

Comments
 (0)