Created
June 6, 2020 09:29
-
-
Save gonzalodiaz/b4d1e0a04e138661c96331a55150905f to your computer and use it in GitHub Desktop.
PreCommitYaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pre-commit | |
on: | |
pull_request: | |
push: | |
branches: [master] | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
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.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment