diff options
author | Marc Mueller <30130371+cdce8p@users.noreply.github.com> | 2021-02-17 01:51:01 +0100 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-02-19 23:06:10 +0100 |
commit | 109789cbc6590963adc9c21561066e8583bcaee5 (patch) | |
tree | acac7df2c1fa4535835f7d631556858c944a6832 | |
parent | 008674ec0ff81a5e4abae0a383b3ebddfad7c912 (diff) | |
download | pylint-git-109789cbc6590963adc9c21561066e8583bcaee5.tar.gz |
Small update to pre-commit hash generation
-rw-r--r-- | .github/workflows/ci.yaml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 69e50dc15..7382ca0da 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -67,14 +67,15 @@ jobs: - name: Generate pre-commit restore key id: generate-pre-commit-key run: >- - echo "::set-output name=key::${{ runner.os }}-pre-commit-${{ - env.CACHE_VERSION }}-${{ hashFiles('.pre-commit-config.yaml') }}" + echo "::set-output name=key::pre-commit-${{ env.CACHE_VERSION }}-${{ + hashFiles('.pre-commit-config.yaml') }}" - name: Restore pre-commit environment id: cache-precommit uses: actions/cache@v2 with: path: ${{ env.PRE_COMMIT_CACHE }} - key: ${{ steps.generate-pre-commit-key.outputs.key }} + key: >- + ${{ runner.os }}-${{ steps.generate-pre-commit-key.outputs.key }} restore-keys: | ${{ runner.os }}-pre-commit-${{ env.CACHE_VERSION }}- - name: Install pre-commit dependencies @@ -113,7 +114,7 @@ jobs: uses: actions/cache@v2 with: path: ${{ env.PRE_COMMIT_CACHE }} - key: ${{ needs.prepare-base.outputs.pre-commit-key }} + key: ${{ runner.os }}-${{ needs.prepare-base.outputs.pre-commit-key }} - name: Fail job if pre-commit cache restore failed if: steps.cache-precommit.outputs.cache-hit != 'true' run: | |