From 9100e475170ded47e1ab7b60166a3dac7be94a9d Mon Sep 17 00:00:00 2001 From: ayodeawe Date: Tue, 19 Sep 2023 11:15:47 -0500 Subject: [PATCH] generate additional tag --- .github/workflows/build-image.yml | 8 +++++++- ci/generate-tags.sh | 10 ++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100755 ci/generate-tags.sh diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index 9825626..427080a 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -57,6 +57,11 @@ jobs: LINUX_VER: ${{ inputs.LINUX_VER }} PYTHON_VER: ${{ inputs.PYTHON_VER }} ARCH: ${{ matrix.ARCH }} + - name: Generate Additional Tag + id: generate-additional-tag + run: ci/generate-tags.sh + env: + CURRENT_TAG: ${{ inputs.IMAGE_NAME }}-${{ matrix.ARCH }} - name: Build image uses: docker/build-push-action@v4 with: @@ -66,4 +71,5 @@ jobs: pull: true build-args: | ${{ steps.generate-build-args.outputs.ARGS }} - tags: ${{ inputs.IMAGE_NAME }}-${{ matrix.ARCH }} + tags: | + ${{ steps.generate-additional-tag.outputs.ARGS }} diff --git a/ci/generate-tags.sh b/ci/generate-tags.sh new file mode 100755 index 0000000..3d241d1 --- /dev/null +++ b/ci/generate-tags.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +prefix=$(echo "$CURRENT_TAG" | awk -F':' '{print $1}') +suffix=$(echo "$CURRENT_TAG" | awk -F':' '{print $2}') + +cat < "${GITHUB_OUTPUT:-/dev/stdout}" +TAGS<