File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change 4343
4444 - name : Determine Tag Name Based on Branch
4545 id : determine_tag
46- run : |
47- if [[ "${{ github.ref_name }}" == "main" ]]; then
48- echo "tagname=latest" >> $GITHUB_OUTPUT
49- elif [[ "${{ github.ref_name }}" == "dev" ]]; then
50- echo "tagname=dev" >> $GITHUB_OUTPUT
51- elif [[ "${{ github.ref_name }}" == "demo" ]]; then
52- echo "tagname=demo" >> $GITHUB_OUTPUT
53- else
54- echo "tagname=default" >> $GITHUB_OUTPUT
55- fi
46+ run : echo "tagname=${{ github.ref_name == 'main' && 'latest' || github.ref_name == 'dev' && 'dev' || github.ref_name == 'demo' && 'demo' || github.head_ref || 'default' }}" >> $GITHUB_OUTPUT
5647
5748 - name : Build Docker Image and optionally push
5849 uses : docker/build-push-action@v6
6152 file : ./App/WebApp.Dockerfile
6253 push : ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' }}
6354 tags : |
64- ${{ steps.registry.outputs.registry }}/km-app:${{ steps.determine_tag.outputs.tagname }}
65- ${{ steps.registry.outputs.registry }}/km-app:${{ steps.determine_tag.outputs.tagname }}_${{ steps.date.outputs.date }}_${{ github.run_number }}
55+ ${{ secrets.ACR_LOGIN_SERVER }}/km-app:${{ steps.determine_tag.outputs.tagname }}
56+ ${{ secrets.ACR_LOGIN_SERVER }}/km-app:${{ steps.determine_tag.outputs.tagname }}_${{ steps.date.outputs.date }}_${{ github.run_number }}
You can’t perform that action at this time.
0 commit comments