Skip to content

Update actions/checkout action to v6 #1

Update actions/checkout action to v6

Update actions/checkout action to v6 #1

Workflow file for this run

name: PR Auto-Fix
on:
pull_request:
types: [opened, synchronize, reopened]
branches: [main, master]
permissions:
contents: write
jobs:
auto-fix:
runs-on: ubuntu-latest
if: github.actor != 'github-actions[bot]' && github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install & Run Python Fixes
run: |
pip install black isort
black . --extend-exclude="/(\.git|\.github|__pycache__|\.pytest_cache)/"
isort . --profile black --skip-glob=".github/*"
- name: Check for changes & Commit
run: |
if [[ -n $(git status -s) ]]; then
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "style: auto-fix linting issues [skip ci]"
git push origin HEAD:${{ github.head_ref }}
fi