-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: 🤖 Add a workflow to update pre-commit config
Add a workflow that runs pre-commit autoupdate and create a PR with the result. Both the package and the template will be updated. ✅ Closes: #91
- Loading branch information
1 parent
a93a148
commit aec2df6
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: pre-commit Update | ||
|
||
on: | ||
schedule: | ||
- cron: "0 7 1/7 * *" # At 7:00 every 7 days | ||
workflow_dispatch: | ||
|
||
jobs: | ||
Copier: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
cache: pip | ||
- name: Install pre-commit | ||
run: pip install pre-commit | ||
- name: Run pre-commit's autoupdate | ||
run: pre-commit autoupdate | ||
- name: Create Pull Request | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
commit-message: "chore: :robot: pre-commit update" | ||
title: "[AUTO] pre-commit update" | ||
branch: auto-pre-commit-update | ||
delete-branch: true | ||
labels: chore | ||
- name: Check outputs | ||
run: | | ||
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | ||
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: pre-commit Update | ||
|
||
on: | ||
schedule: | ||
- cron: "0 7 1/7 * *" # At 7:00 every 7 days | ||
workflow_dispatch: | ||
|
||
jobs: | ||
Copier: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
cache: pip | ||
- name: Install pre-commit | ||
run: pip install pre-commit | ||
- name: Run pre-commit's autoupdate | ||
run: pre-commit autoupdate | ||
- name: Create Pull Request | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
commit-message: "chore: :robot: pre-commit update" | ||
title: "[AUTO] pre-commit update" | ||
branch: auto-pre-commit-update | ||
delete-branch: true | ||
labels: chore | ||
- name: Check outputs | ||
run: | | ||
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | ||
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |