File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 1414 - ' docker-bake.hcl'
1515 - ' **.yml'
1616 workflow_dispatch :
17+ inputs :
18+ tag :
19+ description : ' which tag need to publish'
20+ default : ' '
21+ required : false
1722
1823jobs :
1924 build :
3843 run : docker buildx bake --file docker-bake.hcl --print
3944
4045 - name : Build all images
41- if : github.event_name == 'push ' && github.ref == 'refs/heads/master '
46+ if : github.ref == 'refs/heads/master ' && github.event.inputs.tag == ''
4247 run : docker buildx bake --file docker-bake.hcl --load
4348
49+ - name : Publish an image for tag ${{ inputs.tag }}
50+ if : github.ref == 'refs/heads/master' && github.event.inputs.tag != ''
51+ run : docker buildx bake --file docker-bake.hcl ${{ inputs.tag }} --load
52+
4453 - name : Publish all images
45- if : github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch'
54+ if : github.ref == 'refs/heads/master' && github.event_name == 'workflow_dispatch' && github.event.inputs.tag == ' '
4655 run : docker buildx bake --file docker-bake.hcl --push
56+
57+ - name : Publish an image for tag ${{ inputs.tag }}
58+ if : github.ref == 'refs/heads/master' && github.event_name == 'workflow_dispatch' && github.event.inputs.tag != ''
59+ run : docker buildx bake --file docker-bake.hcl ${{ inputs.tag }} --push
You can’t perform that action at this time.
0 commit comments