diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index 5690b11..2c4ea7c 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -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 @@ -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 @@ -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": [ ] },