Skip to content

governance(build): add groups zip family #264

governance(build): add groups zip family

governance(build): add groups zip family #264

name: release-gating gate
# Blocking gate for the culture/release -> main promotion.
#
# A culture cannot be promoted to main until its release gating data is
# complete -- currently, a complete data/countries.json registry entry.
# This catches the drift class where a culture is developed and promoted
# but never registered (the Mexico gap). See issue #257.
#
# Logic lives in scripts/check_release_gating.py (Python, testable); this
# workflow only orchestrates: derive the waiting countries from the PR
# diff and run the check on them.
#
# To make this an enforced block, add the job's check name to the branch
# protection required checks for main.
on:
pull_request:
branches: [main]
permissions:
contents: read
jobs:
gate:
name: release-gating - Registry complete for waiting countries
# Only the culture/release -> main promotion is gated. Every other PR
# into main (governance, chore) skips this job.
if: github.head_ref == 'culture/release'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Full history so origin/<base>...HEAD resolves to the merge base.
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Check release gating data for waiting countries
env:
BASE_REF: ${{ github.base_ref }}
run: |
# Sub-national-aware slug extraction (see
# scripts/extract_culture_slugs.py). Pre-#532 used
# `cut -d/ -f3` which misrouted sub-national content
# through its parent country's slug -- the schleswig_holstein
# promotion (#524) passed this gate silently because its
# slug came out as `germany`, already registered. The Python
# helper handles depth-3 sovereign and depth-4 sub-national
# in one place, with unit tests
# (tests/test_extract_culture_slugs.py) locking the contract.
SLUGS=$(git diff --name-only "origin/${BASE_REF}...HEAD" \
| python3 scripts/extract_culture_slugs.py)
if [ -z "$SLUGS" ]; then
echo "No culture content in this promotion; release gating not applicable."
exit 0
fi
echo "Waiting countries:" $SLUGS
python3 scripts/check_release_gating.py $SLUGS