-
Notifications
You must be signed in to change notification settings - Fork 6
69 lines (61 loc) · 2.18 KB
/
pre-commit-updates.yml
File metadata and controls
69 lines (61 loc) · 2.18 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# from https://github.com/browniebroke/pre-commit-autoupdate-action
name: Pre-commit auto-update
on:
# every day at midnight
schedule:
- cron: "0 16 * * 3"
# on demand
workflow_dispatch:
permissions: {}
jobs:
auto-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
- uses: browniebroke/pre-commit-autoupdate-action@f5c3ec85103b9f8f9be60b9c006cec763d2bdd02 # v1.0.1
env:
SKIP: "poetry-version-resetter"
- name: Upload changed .pre-commit-config.yaml
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: ".pre-commit-config.yaml"
path: ".pre-commit-config.yaml"
# This second, dependent job is necessary to isolate the content:write permissions that the auto-update job doesn't need.
pr:
needs: auto-update
permissions:
contents: write
actions: none
checks: none
deployments: none
issues: none
discussions: none
packages: none
pull-requests: none
repository-projects: none
security-events: none
statuses: none
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Download changed .pre-commit-config.yaml
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: ".pre-commit-config.yaml"
- uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
if: always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
sign-commits: true
branch: update/pre-commit-hooks
delete-branch: true
labels: dependencies
title: "Update pre-commit hooks"
commit-message: "chore: update pre-commit hooks"
body: Update versions of pre-commit hooks to the latest version.
add-paths: ".pre-commit-config.yaml"