You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# The image's major tag is the stability contract for courses, so a
43
+
# new PLCC major has to release the image as a major too. Otherwise a
44
+
# patch release would move :N onto a new major of the tool. Tags are
45
+
# v-prefixed, so strip it before comparing.
46
+
# Deliberately `feat:` and not `feat!:` — the Angular preset that
47
+
# semantic-release uses does not parse the `!` shorthand, so a
48
+
# `feat!:` subject whose BREAKING CHANGE footer went missing yields
49
+
# no release at all. `feat:` degrades to a minor instead.
50
+
if [ "$(echo "${LATEST#v}" | cut -d. -f1)" != "$(echo "${CURRENT#v}" | cut -d. -f1)" ]; then
51
+
COMMIT_SUBJECT="feat: update PLCC to ${LATEST}"
52
+
COMMIT_BODY="BREAKING CHANGE: PLCC ${LATEST} is a new major version (was ${CURRENT}). Images already published under the previous major tag keep PLCC ${CURRENT}; this release publishes under a new major tag."
53
+
else
54
+
COMMIT_SUBJECT="fix: update PLCC to ${LATEST}"
55
+
COMMIT_BODY=""
56
+
fi
57
+
echo "Release type: $COMMIT_SUBJECT"
58
+
59
+
# Idempotency guard: keyed on the PR, not the branch. A branch with no
60
+
# PR means an earlier run died between push and PR creation; that must
61
+
# be recoverable, not mistaken for work already done.
62
+
if [ -n "$(gh pr list --head "$BRANCH" --state all --json number --jq '.[].number')" ]; then
63
+
echo "A PR for '$BRANCH' already exists. No action needed."
# The PR title becomes the squash-merge commit subject, so it carries
99
+
# the release type. The body carries the BREAKING CHANGE footer for
100
+
# the same reason — on a major, both are what semantic-release reads.
101
+
# Every line stays indented to the run block. A line at column 0 ends
102
+
# the YAML block scalar, which is what made this file unparseable and
103
+
# kept the workflow from ever running. YAML strips this indentation,
104
+
# so the body text itself is unaffected.
105
+
PR_URL=$(gh pr create \
106
+
--title "$COMMIT_SUBJECT" \
72
107
--body "Automated update: PLCC has a new release (${LATEST}).
73
108
74
-
CI will build and test the image on this PR. Merge if green — merging triggers the release workflow, which publishes a new versioned image automatically.
109
+
CI will build and test the image on this PR. Merge if green — merging triggers the release workflow, which publishes a new versioned image automatically.
Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
+29Lines changed: 29 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -66,3 +66,32 @@ jobs:
66
66
repo: context.repo.repo,
67
67
body: `🐳 **PR image built:** \`ghcr.io/ourplcc/plcc-devcontainer:pr-${{ github.event.pull_request.number }}\`\n\nTo test manually, update \`.devcontainer/devcontainer.json\` to use this image tag.`
68
68
})
69
+
70
+
# The single check the ruleset should require.
71
+
#
72
+
# The ruleset previously required "CI" — this workflow's top-level name.
73
+
# Actions posts one check per job, never one named after the workflow, so
74
+
# that check was never reported and every PR hung on "Expected — waiting
75
+
# for status to be reported" while all real checks were green. Requiring
76
+
# `build` would fix it today but break again the moment that job gains a
77
+
# matrix and its check becomes `build (x)`. This name never changes.
78
+
ci-gate:
79
+
needs: [build]
80
+
# Must run even when build fails — without this the gate is itself
81
+
# skipped on failure, reports nothing, and reproduces the same hang.
82
+
if: always()
83
+
runs-on: ubuntu-latest
84
+
permissions: {}
85
+
steps:
86
+
- name: Require all CI jobs to have succeeded
87
+
env:
88
+
BUILD: ${{ needs.build.result }}
89
+
run: |
90
+
echo "build=$BUILD"
91
+
# Anything other than success — failure, cancelled, or skipped —
92
+
# must block the merge.
93
+
if [ "$BUILD" != "success" ]; then
94
+
echo "::error::CI did not fully succeed — build was '$BUILD'."
0 commit comments