File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 4040 username : ${{ secrets.DOCKERHUB_USERNAME }}
4141 password : ${{ secrets.DOCKERHUB_TOKEN }}
4242
43+ - name : Determine Docker tags
44+ id : docker_tags
45+ run : |
46+ if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ inputs.tag }}" ]; then
47+ # Manual workflow dispatch with custom tag
48+ echo "tags=opengisch/pum:${{ inputs.tag }}" >> $GITHUB_OUTPUT
49+ elif [ "${{ github.ref_type }}" = "tag" ]; then
50+ # Tag push: use tag name and latest
51+ echo "tags=opengisch/pum:${{ github.ref_name }},opengisch/pum:latest" >> $GITHUB_OUTPUT
52+ else
53+ # Other branches: use branch name
54+ echo "tags=opengisch/pum:${{ github.ref_name }}" >> $GITHUB_OUTPUT
55+ fi
56+
4357 - uses : docker/build-push-action@v6
4458 with :
4559 context : .
4660 file : ./Dockerfile
4761 push : true
48- tags : opengisch/pum: ${{ inputs.tag || github.ref_name != github.event.repository.default_branch && github.ref_name || 'latest' }}
62+ tags : ${{ steps.docker_tags.outputs.tags }}
You can’t perform that action at this time.
0 commit comments