CICD-490 · Pipeline ownership enforcement
Encyclopedia · Pipeline governance and operational management · All snippets
Previous · CICD-489 · Next · CICD-491
1. Where it fits
- Placement CI ownership gate.
- Prerequisites trusted policy checkout and normalized deployment events with scoped access.
- Platforms local-linux, github-actions, gitea-actions.
2. Copy the snippet
bash
awk '$1=="/.github/workflows/" && NF>=2{ok=1} END{exit !ok}' .github/CODEOWNERS3. How it works
The awk rule requires a nonempty owner entry for the workflow directory. GitHub's ownership enforcement and valid team references need separate verification.
4. Verify the result
Require explicit workflow ownership and do a separate valid-team and review enforcement check.
Validation syntax-validated (Bash parse). Status definitions.