Initial PR: Add gitignore and improve template detection #3866
Workflow file for this run
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: Code formatting | |
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows | |
on: # Trigger the workflow on pull request or merge | |
pull_request: | |
merge_group: | |
types: [checks_requested] | |
defaults: | |
run: | |
shell: bash | |
permissions: {} | |
# actions: read | |
# checks: read | |
# contents: read | |
# deployments: read | |
jobs: | |
pre-commit-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
- name: Set $PY environment variable | |
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} | |
- uses: pre-commit/action@v3.0.0 |