enforce source branch in CI: stage←dev, main←stage
Engram CI — dev / build-and-test (pull_request) Failing after 13s

This commit is contained in:
Will Anderson
2026-05-04 19:34:51 -05:00
parent 0bde5f2af1
commit 3a7065b8f4
2 changed files with 20 additions and 0 deletions
+10
View File
@@ -16,6 +16,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Enforce source branch (stage ← dev only)
if: github.event_name == 'pull_request'
run: |
SOURCE="${GITHUB_HEAD_REF}"
if [ "${SOURCE}" != "dev" ]; then
echo "ERROR: Stage branch only accepts PRs from 'dev'. Source was: '${SOURCE}'"
exit 1
fi
echo "Source branch check passed: ${SOURCE} → stage"
- name: Install build dependencies
run: |
apt-get update -qq
+10
View File
@@ -16,6 +16,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Enforce source branch (main ← stage only)
if: github.event_name == 'pull_request'
run: |
SOURCE="${GITHUB_HEAD_REF}"
if [ "${SOURCE}" != "stage" ]; then
echo "ERROR: Main branch only accepts PRs from 'stage'. Source was: '${SOURCE}'"
exit 1
fi
echo "Source branch check passed: ${SOURCE} → main"
- name: Install build dependencies
run: |
apt-get update -qq