Skip to content

Commit 4ae7599

Browse files
committed
ci(prek): add zizmor hook
1 parent 8e5c0e4 commit 4ae7599

File tree

4 files changed

+131
-135
lines changed

4 files changed

+131
-135
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,15 @@ jobs:
8383
- name: Filter out `shared` group; If no changes detected, return `hello_world` scenario
8484
id: filter-edited
8585
run: |
86-
JSON=$(echo '${{ steps.filter.outputs.changes }}' | jq -c 'map(select(. != "shared"))')
86+
JSON=$(echo '${CHANGES}' | jq -c 'map(select(. != "shared"))')
8787
8888
if [[ $JSON == '[]' ]]; then
8989
JSON='["plugins/tests/molecule/hello_world"]'
9090
fi
9191
9292
echo "changes=$JSON" >> $GITHUB_OUTPUT
93+
env:
94+
CHANGES: ${{ steps.filter.outputs.changes }}
9395

9496
test:
9597
name: Tests
@@ -123,9 +125,10 @@ jobs:
123125
run: uv run ansible-galaxy install -r requirements.yml
124126

125127
- name: Run tests
126-
run: make test DRIVER=docker DISCOVER=${{ matrix.molecule-discover }}
128+
run: make test DRIVER=docker DISCOVER=${MOLECULE_DISCOVER}
127129
env:
128130
MOLECULE_DISTRO: ${{ matrix.molecule-distro }}
131+
MOLECULE_DISCOVER: ${{ matrix.molecule-discover }}
129132

130133
galaxy-deploy:
131134
name: Release to Ansible Galaxy

.pre-commit-config.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ repos:
4040
hooks:
4141
- id: actionlint
4242

43+
- repo: https://github.com/zizmorcore/zizmor-pre-commit
44+
rev: v1.18.0
45+
hooks:
46+
- id: zizmor
47+
args: [--fix=safe]
48+
4349
- repo: https://github.com/compwa/taplo-pre-commit
4450
rev: v0.9.3
4551
hooks:
@@ -51,7 +57,7 @@ repos:
5157
- id: gitleaks
5258

5359
- repo: https://github.com/astral-sh/ruff-pre-commit
54-
rev: v0.14.8
60+
rev: v0.14.9
5561
hooks:
5662
- id: ruff-format
5763
- id: ruff-check
@@ -63,7 +69,7 @@ repos:
6369
- id: j2lint
6470

6571
- repo: https://github.com/ansible/ansible-lint
66-
rev: v25.12.0
72+
rev: v25.12.1
6773
hooks:
6874
- id: ansible-lint
6975
args: [--fix]

0 commit comments

Comments
 (0)