Skip to content

Commit 400179a

Browse files
author
Gianni Stubbe
committed
fix: make workflow policy check shellcheck-safe
1 parent 42717ca commit 400179a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/workflow-lint.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ jobs:
6060
run: |
6161
set -euo pipefail
6262
plan_job="$(awk '/^ plan:/{inside=1} /^ build:/{inside=0} inside' .github/workflows/opencode.yml)"
63-
! grep -q 'id-token: write' <<<"$plan_job"
63+
if grep -q 'id-token: write' <<<"$plan_job"; then
64+
exit 1
65+
fi
6466
grep -q "USE_GITHUB_TOKEN: 'true'" .github/workflows/opencode.yml
6567
grep -q 'Reauthorize commenter after approval' .github/workflows/opencode.yml
6668
- name: Validate GitHub Actions workflows

0 commit comments

Comments
 (0)