#!/bin/bash set -euo pipefail cd "$(dirname "$0")/.." shopt -s nullglob if (( $# )); then files=("$@") else files=(.github/workflows/*.yml .github/workflows/*.yaml .tangled/workflows/*.yml .tangled/workflows/*.yaml) fi (( ${#files[@]} > 0 )) || { printf 'No workflow files found.\n' >&2; exit 1; } command -v actionlint >/dev/null || { printf 'actionlint is required; run mise run setup.\n' >&2; exit 1; } command -v zizmor >/dev/null || { printf 'zizmor is required; run mise run setup.\n' >&2; exit 1; } policy_files=("${files[@]}" .github/actions/*/action.yml .github/actions/*/action.yaml) Scripts/parcel-dev.sh check-workflows "${policy_files[@]}" actionlint "${files[@]}" if [[ -f .github/zizmor.yml ]]; then zizmor --offline --pedantic --config .github/zizmor.yml "${policy_files[@]}" else zizmor --offline --pedantic "${policy_files[@]}" fi for script in Scripts/*.sh Scripts/tests/*.sh; do bash -n "$script"; done printf '%s\n' 'Workflow YAML, pinned actions, hosted runners, actionlint, zizmor, and shell syntax checks passed.'