@@ -48,11 +48,13 @@ jobs:
4848
4949 - name : Check tag consistency
5050 if : ${{ inputs.plan != '' && !fromJson(inputs.plan).announcement_tag_is_implicit }}
51+ env :
52+ TAG : ${{ inputs.plan != '' && fromJson(inputs.plan).announcement_tag || 'dry-run' }}
5153 run : |
5254 version=$(grep "version = " pyproject.toml | sed -e 's/version = "\(.*\)"/\1/g')
53- if [ "${{ fromJson(inputs.plan).announcement_tag } }" != "${version}" ]; then
55+ if [ "${TAG }" != "${version}" ]; then
5456 echo "The input tag does not match the version from pyproject.toml:" >&2
55- echo "${{ fromJson(inputs.plan).announcement_tag } }" >&2
57+ echo "${TAG }" >&2
5658 echo "${version}" >&2
5759 exit 1
5860 else
@@ -175,6 +177,8 @@ jobs:
175177
176178 - name : Generate Dynamic Dockerfile Tags
177179 shell : bash
180+ env :
181+ TAG_VALUE : ${{ fromJson(inputs.plan).announcement_tag }}
178182 run : |
179183 set -euo pipefail
180184
@@ -195,8 +199,8 @@ jobs:
195199 # Loop through all base tags and append its docker metadata pattern to the list
196200 # Order is on purpose such that the label org.opencontainers.image.version has the first pattern with the full version
197201 IFS=','; for TAG in ${BASE_TAGS}; do
198- TAG_PATTERNS="${TAG_PATTERNS}type=pep440,pattern={{ version }},suffix=-${TAG},value=${{ fromJson(inputs.plan).announcement_tag } }\n"
199- TAG_PATTERNS="${TAG_PATTERNS}type=pep440,pattern={{ major }}.{{ minor }},suffix=-${TAG},value=${{ fromJson(inputs.plan).announcement_tag }}\n"
202+ TAG_PATTERNS="${TAG_PATTERNS}type=pep440,pattern={{ version }},suffix=-${TAG},value=${TAG_VALUE }\n"
203+ TAG_PATTERNS="${TAG_PATTERNS}type=pep440,pattern={{ major }}.{{ minor }},suffix=-${TAG},value=${TAG_VALUE }}\n"
200204 TAG_PATTERNS="${TAG_PATTERNS}type=raw,value=${TAG}\n"
201205 done
202206
0 commit comments