Skip to content

Commit

Permalink
Create a_pre_commit.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludy87 committed Jan 26, 2024
1 parent bc6557d commit 68a5503
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/a_pre_commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Pre-commit

on:
pull_request_target:
push:
branches: [main]

permissions:
contents: write
pull-requests: write

jobs:
update:
if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
with:
token: ${{ secrets.TOKEN }}
- name: Set up Python
uses: actions/setup-python@v5.0.0
with:
python-version: |
3.11
- name: Install Dependencies
run: |
pip install pre-commit
pre-commit install
- name: Pre-commit and auto commit
run: |
pre-commit run --all-files || true
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5.0.2
with:
token: ${{ secrets.TOKEN }}
commit-message: Update files
committer: GitHub Action <action@github.com>
author: GitHub Action <action@github.com>
signoff: true
branch: pre-commit
# base: main
title: '🔨 Update files by <github-actions[bot]>'
body: |
Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
labels: |
wait
in progress
bot
draft: false
delete-branch: true

0 comments on commit 68a5503

Please sign in to comment.