Skip to content

Commit 1778db3

Browse files
committed
Use reusable workflows to not duplicate them
1 parent e8333c5 commit 1778db3

File tree

2 files changed

+6
-39
lines changed

2 files changed

+6
-39
lines changed

.github/workflows/pre-commit-autoupdate.yml

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,10 @@ on:
77
# on demand
88
workflow_dispatch:
99

10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
1014
jobs:
1115
auto-update:
12-
runs-on: ubuntu-latest
13-
14-
permissions:
15-
contents: write
16-
pull-requests: write
17-
18-
steps:
19-
- uses: actions/checkout@v6
20-
21-
- uses: actions/setup-python@v6
22-
with:
23-
python-version: 3.x
24-
25-
- run: pip install pre-commit
26-
- run: pre-commit autoupdate
27-
- run: pre-commit run --all-files
28-
29-
- uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0
30-
if: always()
31-
with:
32-
token: ${{ secrets.GITHUB_TOKEN }}
33-
branch: update/pre-commit-hooks
34-
title: Update pre-commit hooks
35-
commit-message: "chore: update pre-commit hooks"
36-
body: Update versions of pre-commit hooks to latest version.
16+
uses: mathbunnyru/pre-commit-workflows/.github/workflows/pre-commit-autoupdate.yml@main

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,4 @@ on:
99

1010
jobs:
1111
run-hooks:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- name: Checkout Repo ⚡️
15-
uses: actions/checkout@v6
16-
- name: Set Up Python 🐍
17-
uses: actions/setup-python@v6
18-
with:
19-
python-version: 3.x
20-
- name: Install pre-commit 📦
21-
run: |
22-
pip install --upgrade pip
23-
pip install --upgrade pre-commit
24-
- name: Run pre-commit ✅
25-
run: pre-commit run --all-files
12+
uses: mathbunnyru/pre-commit-workflows/.github/workflows/pre-commit.yml@main

0 commit comments

Comments
 (0)