Skip to content

Commit dde8373

Browse files
committed
ci(golden): standalone workflow runs the semver gate on PRs
Triggered only when corpus pins or samcli/__init__.py change. Tiny, auditable, isolated from build.yml so it can be reasoned about independently.
1 parent 8001573 commit dde8373

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Golden Templates Semver Gate
2+
3+
# Always run on PRs to develop / feat branches. The check_semver_bump.py
4+
# script self-gates: it returns exit 0 when no expected.*.yaml files
5+
# changed, so an unconditional run is cheap and posts a definitive
6+
# status on every PR. Do NOT use `on.pull_request.paths:` filtering —
7+
# path filtering skips the whole workflow when no path matches, which
8+
# means no status is posted, which means branch protection treats a
9+
# required check as missing/pending and blocks the PR. Self-gating in
10+
# the script is the canonical fix for the "skipped but required check"
11+
# pitfall.
12+
on:
13+
pull_request:
14+
branches:
15+
- develop
16+
- "feat/*"
17+
- "feat-*"
18+
19+
permissions:
20+
contents: read
21+
22+
jobs:
23+
semver-gate:
24+
if: github.repository_owner == 'aws'
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v6
28+
with:
29+
fetch-depth: 0
30+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
31+
with:
32+
python-version: "3.11"
33+
- name: Run semver gate
34+
run: |
35+
python tests/golden/check_semver_bump.py \
36+
--base "origin/${{ github.base_ref }}" \
37+
--head HEAD

0 commit comments

Comments
 (0)