Skip to content

Commit ffc827e

Browse files
committed
ci: use zizmor
1 parent 0f7ddd1 commit ffc827e

File tree

4 files changed

+33
-10
lines changed

4 files changed

+33
-10
lines changed

.github/dependabot.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ updates:
44
directory: /
55
schedule:
66
interval: weekly
7+
groups:
8+
github-actions:
9+
patterns: ["*"]

.github/workflows/ci.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ concurrency:
1212
group: ci-${{ github.ref }}
1313
cancel-in-progress: true
1414

15+
permissions: {}
16+
1517
jobs:
1618
lint:
1719
runs-on: ubuntu-latest
1820
steps:
19-
- uses: actions/checkout@v6
20-
- uses: j178/prek-action@v1
21+
- uses: actions/checkout@v6 # zizmor: ignore[unpinned-uses]
22+
with:
23+
persist-credentials: false
24+
- uses: j178/prek-action@v1 # zizmor: ignore[unpinned-uses]
2125

2226
bootstrap:
2327
runs-on: ${{ matrix.os }}-latest

.github/workflows/pre_commit_autoupdate.yaml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,27 @@ on:
44
schedule: [cron: "0 0 * * 0"] # weekly
55
workflow_dispatch:
66

7+
permissions: {}
8+
79
jobs:
810
update:
911
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
pull-requests: write
1015
steps:
1116
- uses: actions/checkout@v6
12-
- run: pipx install prek
13-
- run: prek autoupdate
14-
- uses: peter-evans/create-pull-request@v8
1517
with:
16-
branch: pre-commit-autoupdate
17-
title: "pre-commit: autoupdate"
18-
body: ""
19-
commit-message: "pre-commit: autoupdate"
20-
labels: automerge
18+
persist-credentials: false
19+
- run: pipx install prek
20+
- run: prek autoupdate; echo >>.pre-commit-config.yaml
21+
- name: Create PR
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
run: |
25+
git diff --exit-code && echo No changes to commit && exit 0
26+
git config --local user.name "github-actions[bot]"
27+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
28+
git checkout -b pre-commit-autoupdate
29+
git commit -am "pre-commit: autoupdate"
30+
git push -u origin && gh pr create --fill

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ repos:
3232
- id: codespell
3333
args: [--ignore-words-list=protols]
3434

35+
- repo: https://github.com/zizmorcore/zizmor-pre-commit
36+
rev: v1.19.0
37+
hooks:
38+
- id: zizmor
39+
args: [--fix=all]
40+
3541
- repo: local
3642
hooks:
3743
- id: fish_indent

0 commit comments

Comments
 (0)