Skip to content

Run the no-commit-to-branch check only locally #8237

Run the no-commit-to-branch check only locally

Run the no-commit-to-branch check only locally #8237

Workflow file for this run

name: pre-commit
on:
pull_request:
push:
branches: [main]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Skip hook when run for 'push'
if: ${{ github.event_name == 'push' }}
run: echo "SKIP=no-commit-to-branch" >> $GITHUB_ENV
- uses: pre-commit/[email protected]