Skip to content

Commit

Permalink
generate additional tag
Browse files Browse the repository at this point in the history
  • Loading branch information
AyodeAwe committed Sep 19, 2023
1 parent 7f9d049 commit 9cdf3db
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
10 changes: 10 additions & 0 deletions ci/generate-tags.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

prefix=$(echo "$CURRENT_TAG" | awk -F':' '{print $1}')
suffix=$(echo "$CURRENT_TAG" | awk -F':' '{print $2}')

cat <<EOF > "${GITHUB_OUTPUT:-/dev/stdout}"
TAGS<<EOT
$(printf "%s\n" "${prefix}:${suffix}" "${prefix}-conda:${suffix}")
EOT
EOF

0 comments on commit 9cdf3db

Please sign in to comment.