File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
.github/actions/dockerhub-build-push Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,14 @@ inputs:
2424 required : false
2525 description : " Docker build context"
2626 default : ${{ github.workspace }}
27+ platforms :
28+ required : false
29+ description : " Docker build platforms"
30+ default : linux/amd64,linux/arm64
31+ push-latest :
32+ required : false
33+ description : " Push latest tag"
34+ default : " true"
2735runs :
2836 using : " composite"
2937 steps :
3947 env :
4048 IMAGE_NAME : ${{ inputs.image-name }}
4149 IMAGE_TAG : ${{ inputs.image-tag }}
50+ PUSH_LATEST : ${{ inputs.push-latest }}
4251 run : |
4352 if [ ! -z "$IMAGE_TAG" ]; then
4453 TAGS="$IMAGE_NAME:$IMAGE_TAG"
5261 echo "No matching condition for build, skipping."
5362 exit 0
5463 fi
64+ if [ "${PUSH_LATEST}" = "true" ]; then
65+ TAGS="$TAGS $IMAGE_NAME:latest"
66+ fi
5567 echo "tags=$TAGS" >> $GITHUB_OUTPUT
5668
5769 - name : Set up QEMU and Buildx
7082 uses : docker/build-push-action@v6
7183 with :
7284 push : true
85+ platforms : ${{ inputs.platforms }}
7386 file : ${{ inputs.dockerfile }}
7487 context : ${{ inputs.build-context }}
7588 tags : ${{ steps.vars.outputs.tags }}
You can’t perform that action at this time.
0 commit comments