Skip to content

Commit 04c43f2

Browse files
rmcdanielclaude
andcommitted
Check the release-candidate registry choice in the native tag check
check-native-release-tags.sh drove the publisher without the new PUBLISH_DOCKERHUB input, so it stopped at that refusal. It now passes the input explicitly and also checks that only a release candidate may skip Docker Hub and that the choice must be explicit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 805324c commit 04c43f2

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

‎scripts/ci/check-native-release-tags.sh‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
# - the PHP Release workflow's push-tag filter matches no native- tag, so a
55
# native tag starts no PHP release, and still matches plain versions;
66
# - the tag verifier accepts native- only when asked for it;
7-
# - the native publisher accepts only native- tags.
7+
# - the native publisher accepts only native- tags, and lets only a release
8+
# candidate (-rc.N) skip Docker Hub.
89
# Each script is stopped at its input checks, before any API or registry call.
910
set -euo pipefail
1011
fail() { printf 'Native release tag check failed: %s\n' "$1" >&2; exit 1; }
@@ -55,7 +56,12 @@ expect "may only be empty or native-" RELEASE_TAG=x-2.12.0 RELEASE_TAG_PREFIX=x-
5556

5657
publish=scripts/ci/native-release-publish.sh
5758
images=(GHCR_IMAGE=ghcr.io/example/native DOCKERHUB_IMAGE=example/native)
58-
expect "must be native-<exact release version>" RELEASE_TAG=2.12.0-rc.1 "${images[@]}" bash "$publish"
59-
# No digests stops the publisher right after the native tag is accepted.
60-
expect "exact smoked digest" RELEASE_TAG=native-2.12.0-rc.1 "${images[@]}" bash "$publish"
59+
expect "must be native-<exact release version>" RELEASE_TAG=2.12.0-rc.1 "${images[@]}" PUBLISH_DOCKERHUB=true bash "$publish"
60+
# No digests stops the publisher right after the tag and registries are accepted.
61+
expect "exact smoked digest" RELEASE_TAG=native-2.12.0-rc.1 "${images[@]}" PUBLISH_DOCKERHUB=true bash "$publish"
62+
expect "exact smoked digest" RELEASE_TAG=native-2.12.0-rc.1 "${images[@]}" PUBLISH_DOCKERHUB=false bash "$publish"
63+
expect "exact smoked digest" RELEASE_TAG=native-3.0.0 "${images[@]}" PUBLISH_DOCKERHUB=true bash "$publish"
64+
# Only a release candidate may skip Docker Hub, and the choice must be explicit.
65+
expect "only a release candidate (-rc.N) may skip Docker Hub" RELEASE_TAG=native-3.0.0 "${images[@]}" PUBLISH_DOCKERHUB=false bash "$publish"
66+
expect "PUBLISH_DOCKERHUB must be true or false" RELEASE_TAG=native-2.12.0-rc.1 "${images[@]}" bash "$publish"
6167
printf 'Native release tags: %d release.yml pattern(s) checked; verifier and publisher accept native- only as intended.\n' "${#patterns[@]}"

0 commit comments

Comments
 (0)