Update web workflow with additional logic (#3256)

Co-authored-by: Joseph Flinn <58369717+joseph-flinn@users.noreply.github.com>
This commit is contained in:
Micaiah Martin 2022-08-05 19:33:08 +00:00 committed by GitHub
parent a1e536a5ef
commit 5f13c4722f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -341,12 +341,18 @@ jobs:
- name: Get image tag
id: image-tag
run: |
IMAGE_TAG=$(echo "${GITHUB_REF:11}" | sed "s#/#-#g")
if [[ $(grep "pull" <<< "${GITHUB_REF}") ]]; then
IMAGE_TAG=${GITHUB_HEAD_REF}
else
IMAGE_TAG=$(echo "${GITHUB_REF:11}" | sed "s#/#-#g")
fi
TAG_EXTENSION=${{ github.event.inputs.custom_tag_extension }}
if [[ $TAG_EXTENSION ]]; then
IMAGE_TAG=$IMAGE_TAG-$TAG_EXTENSION
fi
echo "::set-output name=value::$IMAGE_TAG"
- name: Tag image