11name : container-build-push
22description : Simple github action that uses various docker actions to build and publish multiarch container images with meaningful tags.
33inputs :
4+ context :
5+ description : " build's context is the set of files located in the specified path"
6+ default : " ."
7+ file :
8+ description : " path to the Dockerfile (default ./Dockerfile)"
9+ default : " ./Dockerfile"
410 checkout-deploy-key :
511 description : " checkout deploy key"
612 default : " "
@@ -10,7 +16,7 @@ inputs:
1016 required : true
1117 user :
1218 description : " container registry user"
13- default : ${{ github.actor }}
19+ default : " ${{ github.actor }}"
1420 required : true
1521 token :
1622 description : " container registry token"
@@ -50,16 +56,17 @@ runs:
5056 with :
5157 images : ${{ inputs.registry }}/${{ github.repository }}
5258 tags : |
53- type=ref,event=branch
54- type=sha,prefix=,format=short
59+ type=semver,pattern={{version}}
5560 type=edge,branch=main
5661 type=edge,branch=master
57- type=semver,pattern={{version}}
62+ type=ref,event=branch
63+ type=sha,prefix=,format=short
5864
5965 - name : Build and push container image
6066 uses : docker/build-push-action@v4
6167 with :
62- context : .
68+ context : ${{ inputs.context }}
69+ file : ${{ inputs.file }}
6370 push : true
6471 provenance : false # https://github.com/docker/build-push-action/issues/820
6572 tags : ${{ steps.meta.outputs.tags }}
0 commit comments