File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 7878 NEW_TAG=$(echo "$VERSION_OUTPUT" | sed -E 's/.*version ([0-9.]+[^ ]*).*/\1/')
7979 echo "Cleaned version: $NEW_TAG"
8080
81+ # Extract version from input image tag and validate
82+ INPUT_VERSION=$(echo "$IMAGE" | sed -E 's|.*:.*-([0-9.]+[^ ]*).*|\1|')
83+
84+ # Validate that versions match
85+ if [ "$NEW_TAG" != "$INPUT_VERSION" ]; then
86+ echo "ERROR: Version mismatch!"
87+ echo " Version from container: $NEW_TAG"
88+ echo " Version from input tag: $INPUT_VERSION"
89+ echo " Input image: $IMAGE"
90+ exit 1
91+ fi
92+
8193 # Append "-prerelease" if necessary and determine repository
8294 if [ "${{ github.event.inputs.release_environment || inputs.release_environment }}" = "staging" ]; then
8395 NEW_TAG="${NEW_TAG}-prerelease"
You can’t perform that action at this time.
0 commit comments