Skip to content

Commit 2065b6d

Browse files
authored
ci: add zizmor pre-commit hook and fix issues (#170)
1 parent e26614c commit 2065b6d

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

.github/workflows/deploy-preview.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
# allow repository maintainers to modify and test workflow
66
paths:
77
- ".github/workflows/deploy-preview.yaml"
8-
pull_request_target:
8+
pull_request_target: # zizmor: ignore[dangerous-triggers]
99
# enable runs for this workflow when labeled as safe only
1010
# prevent execution when the workflow itself is modified from a fork
1111
types:
@@ -27,6 +27,7 @@ jobs:
2727
- name: Checkout
2828
uses: actions/checkout@v3
2929
with:
30+
persist-credentials: false
3031
ref: ${{ github.event.pull_request.head.sha }}
3132

3233
- name: Set up Python

.github/workflows/deploy-production.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
steps:
1717
- name: Checkout
1818
uses: actions/checkout@v3
19+
with:
20+
persist-credentials: false
1921

2022
- name: Set up Python
2123
uses: actions/setup-python@v4

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,11 @@ repos:
3131
additional_dependencies:
3232
3333
34+
35+
- repo: https://github.com/woodruffw/zizmor-pre-commit
36+
rev: v0.8.0
37+
hooks:
38+
- id: zizmor
39+
# types and files can be removed with https://github.com/woodruffw/zizmor-pre-commit/pull/2
40+
types: [yaml]
41+
files: \.github/workflows/.*$

0 commit comments

Comments
 (0)