summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Mueller <30130371+cdce8p@users.noreply.github.com>2021-02-17 01:51:01 +0100
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-02-19 23:06:10 +0100
commit109789cbc6590963adc9c21561066e8583bcaee5 (patch)
treeacac7df2c1fa4535835f7d631556858c944a6832
parent008674ec0ff81a5e4abae0a383b3ebddfad7c912 (diff)
downloadpylint-git-109789cbc6590963adc9c21561066e8583bcaee5.tar.gz
Small update to pre-commit hash generation
-rw-r--r--.github/workflows/ci.yaml9
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: |