Skip to content

Fix pre-commit GH Action not running on PR updates (#107) #217

Fix pre-commit GH Action not running on PR updates (#107)

Fix pre-commit GH Action not running on PR updates (#107) #217

Workflow file for this run

name: pre-commit
on:
push:
branches:
- main
- master
pull_request:
types: [opened, reopened, synchronize, review_requested, ready_for_review]
workflow_dispatch:
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true
env:
PYTHON_VERSION: "3.10"
jobs:
pre-commit:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
## Run pre-commit and try to apply fixes
- name: Run pre-commit
uses: pre-commit/action@v3.0.1
- name: Apply fixes from pre-commit
uses: pre-commit-ci/lite-action@v1.0.2
if: always()