Skip to content

Merge pull request #9 from NTGNguyen/auto/pre-commit-fix #28

Merge pull request #9 from NTGNguyen/auto/pre-commit-fix

Merge pull request #9 from NTGNguyen/auto/pre-commit-fix #28

Workflow file for this run

#Precommit-Action
name: Pre-commit Auto Fix
on:
push:
branches:
- main
jobs:
pre-commit:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.12"
- name: Install dependencies
if: ${{ always() }}
run: |
python -m pip install --upgrade pip
pip install pre-commit
- name: Run pre-commit
if: ${{ always() }}
run: pre-commit run --all-files
- name: Create Pull Request
if: ${{ always() }}
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "🎨 Auto Code Fix (Pre-commit)"
branch: auto/pre-commit-fix
title: "🎨 Auto Code Fix (Pre-commit)"
body: "This pull request contains auto code fixes from pre-commit."
labels: |
auto-fix
pre-commit