11
0
Fork 0
mirror of https://github.com/pre-commit/action.git synced 2026-04-07 14:56:54 +00:00

embedding cache steps by using @actions/cache

This commit is contained in:
Trim21 2020-06-08 22:56:46 +08:00 committed by Anthony Sottile
parent 7d1e41a366
commit 4a08748ace
4 changed files with 95 additions and 12 deletions

View file

@ -24,12 +24,6 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
- name: set PY
run: echo "::set-env name=PY::$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')"
- uses: actions/cache@v1
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- uses: pre-commit/action@v1.1.1
```