forked from pymc-devs/pymc
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (33 loc) · 1.15 KB
/
autoupdate-pre-commit-config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: "Update pre-commit config"
on:
schedule:
- cron: "0 7 * * 1" # At 07:00 on each Monday.
workflow_dispatch:
jobs:
update-pre-commit:
if: github.repository_owner == 'pymc-devs'
name: Autoupdate pre-commit config
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v5
- name: Cache multiple paths
uses: actions/cache@v3
with:
path: |
~/.cache/pre-commit
~/.cache/pip
key: pre-commit-autoupdate-${{ runner.os }}-build
- name: Update pre-commit config packages
uses: technote-space/create-pr-action@v2
with:
GITHUB_TOKEN: ${{ secrets.ACTION_TRIGGER_TOKEN }}
EXECUTE_COMMANDS: |
pip install pre-commit
pre-commit autoupdate || (exit 0);
pre-commit run -a || (exit 0);
COMMIT_MESSAGE: "⬆️ UPGRADE: Autoupdate pre-commit config"
COMMIT_NAME: "pymc-bot"
COMMIT_EMAIL: "[email protected]"
PR_BRANCH_NAME: "pre-commit-config-update-${PR_ID}"
PR_TITLE: "⬆️ UPGRADE: Autoupdate pre-commit config"