Skip to content

Commit 0da7bce

Browse files
committed
ci: use improved cache key set during container build
1 parent e26807c commit 0da7bce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/main.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,19 @@ jobs:
4747
name: Lint / `pre-commit`
4848
needs: should-run
4949
if: fromJSON(needs.should-run.outputs.should-run)
50-
container: techneg/ci-pre-commit:v2.2.29
50+
container: techneg/ci-pre-commit:v2.3.1
5151
runs-on: ubuntu-latest
5252
timeout-minutes: 5
5353
steps:
5454
# yamllint disable-line rule:comments
5555
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
56-
- name: Export Python package hash for caching
57-
run: echo "PYTHON_SHA256=$PYTHON_SHA256" >> $GITHUB_ENV
56+
- name: Export `CI_CACHE_ID` from container
57+
run: echo "CI_CACHE_ID=$(cat /.ci_cache_id)" >> $GITHUB_ENV
5858
# yamllint disable-line rule:comments
5959
- uses: actions/[email protected]
6060
with:
6161
path: ~/.cache/pre-commit
62-
key: "pre-commit-4|${{ env.PYTHON_SHA256 }}|\
62+
key: "${{ env.CI_CACHE_ID }}|\
6363
${{ hashFiles('.pre-commit-config.yaml') }}"
6464
- name: Run `pre-commit`
6565
run: |

0 commit comments

Comments
 (0)