Skip to content

Drifter patch precommit #5

Drifter patch precommit

Drifter patch precommit #5

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
with:
fetch-depth: 0
- uses: actions/setup-python@v3
- uses: actions/setup-python@v3
- name: Install pre-commit
run: |
pip install pre-commit
- name: Run pre-commit on changed files
run: |
BASE_REF=$(git merge-base origin/main HEAD)
pre-commit run --from-ref $BASE_REF --to-ref HEAD
- name: Commit Prettier changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Apply formatting changes
branch: ${{ github.head_ref }} # Push changes back to the current branch