|
4 | 4 | # - the PHP Release workflow's push-tag filter matches no native- tag, so a |
5 | 5 | # native tag starts no PHP release, and still matches plain versions; |
6 | 6 | # - 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. |
8 | 9 | # Each script is stopped at its input checks, before any API or registry call. |
9 | 10 | set -euo pipefail |
10 | 11 | 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- |
55 | 56 |
|
56 | 57 | publish=scripts/ci/native-release-publish.sh |
57 | 58 | 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" |
61 | 67 | printf 'Native release tags: %d release.yml pattern(s) checked; verifier and publisher accept native- only as intended.\n' "${#patterns[@]}" |
0 commit comments