Skip to content

Commit

Permalink
gha: add alt_tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
baracudda committed Mar 27, 2024
1 parent 714b83e commit b8ff656
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ jobs:
build_cfg:
runs-on: ubuntu-latest
environment: default
env:
REF_NAME: ${{ github.ref_name }}
outputs:
VERSION_STR: ${{ steps.config_step.outputs.VERSION_STR }}
ALT_TAGS: ${{ steps.config_step.outputs.ALT_TAGS }}
steps:
- name: "Determine Version"
id: config_step
Expand All @@ -31,6 +34,15 @@ jobs:
VERSION_STR=${VERSION_NUM}
fi
echo "VERSION_STR=${VERSION_STR}" >> $GITHUB_OUTPUT
ALT_TAGS=""
if [[ "${{ github.ref_name }}" == "develop" ]]; then
ALT_TAGS+=",ci-develop"
else
ALT_TAGS=",ci-dev-${REF_NAME#**/}"
fi
echo "ALT_TAGS=${ALT_TAGS}" >> $GITHUB_OUTPUT
echo "::notice::Version STR=${VERSION_STR}"
#endjob build_cfg

Expand Down Expand Up @@ -60,7 +72,7 @@ jobs:
"dockerfile": "Dockerfile",
"arch_allowed": "amd64 arm64",
"name": "${{ github.repository }}",
"tag": "${{ needs.build_cfg.outputs.VERSION_STR }}",
"tag": "${{ needs.build_cfg.outputs.VERSION_STR }}${{ needs.build_cfg.outputs.ALT_TAGS }}",
"build_args": [
]
},
Expand Down

0 comments on commit b8ff656

Please sign in to comment.