Skip to content

Run Pre-commit GHA for each commit #2

Run Pre-commit GHA for each commit

Run Pre-commit GHA for each commit #2

Workflow file for this run

---
name: pre-commit
on:
pull_request:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
- uses: actions/setup-go@v5
with:
go-version: '>=1.18'
- uses: actions/cache@v4
with:
path: |
~/.cache/pre-commit
key: ${{ runner.os }}-precommit-${{ hashFiles('**/.pre-commit-config.yaml/*') }}
restore-keys: |
${{ runner.os }}-precommit-
- uses: pre-commit/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}