Add CI job to auto-update pre-commit dependencies weekly
This commit is contained in:
36
.github/workflows/pre-commit.yaml
vendored
Normal file
36
.github/workflows/pre-commit.yaml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
# Until Dependabot support is released https://github.com/dependabot/dependabot-core/issues/1524
|
||||
name: Pre-commit update
|
||||
|
||||
on:
|
||||
# every week on monday
|
||||
schedule:
|
||||
- cron: "0 0 * * 1"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
upgrade:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config user.name "$GITHUB_ACTOR"
|
||||
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
||||
|
||||
- name: Run autoupdate
|
||||
run: |
|
||||
pre-commit autoupdate
|
||||
|
||||
- name: Commit and push
|
||||
run: |
|
||||
git add ".pre-commit-config.yaml"
|
||||
git commit -m "Upgrade pre-commit dependencies"
|
||||
git push origin upgrade/pre-commit
|
||||
|
||||
- name: Open pull request
|
||||
run: |
|
||||
gh pr create --fill
|
||||
Reference in New Issue
Block a user