Skip to content

Commit

Permalink
Fix cache management of CI checker
Browse files Browse the repository at this point in the history
  • Loading branch information
rsp4jack authored Jan 1, 2024
1 parent a85a25b commit 2d657cc
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,23 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Get checker commit hash
run: |
git log --no-decorate --pretty=format:"CHECKER_COMMIT=%h" -1 check >> $GITHUB_ENV
- name: Get checker hash
id: computehash
uses: seepine/hash-files@v1
with:
# The working dir for the action.
# Default: ${{ github.workspace }}
workdir: ''

# The patterns used to match files.
patterns: 'checker/**'

- name: Cache
id: cache
uses: actions/cache@v3
with:
path: check/target/release/check
key: check-build-cache-${{ env.CHECKER_COMMIT }}
key: check-build-cache-${{ steps.computehash.outputs.short }}

- name: Build
if: steps.cache.outputs.cache-hit != 'true'
Expand Down

0 comments on commit 2d657cc

Please sign in to comment.