Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/actions/generate-builder/builder-fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ set -euo pipefail
PREFIX="refs/tags/"

# Extract version.
# detect-workflow-js emits a bare 40-char SHA when the caller pins the
# reusable workflow with @<sha>. Normalise that to the refs/tags/ form
# so the SHA-resolution path below can resolve it to a release tag.
if [[ "$BUILDER_REF" =~ ^[a-f0-9]{40}$ ]]; then
BUILDER_REF="${PREFIX}${BUILDER_REF}"
fi

if [[ "$BUILDER_REF" != "$PREFIX"* ]]; then
echo "Invalid ref: $BUILDER_REF. Expected ref of the form refs/tags/vX.Y.Z"
exit 2
Expand Down