diff --git a/.github/actions/docker-build/README.md b/.github/actions/docker-build/README.md index 3a5aef5..9c7c412 100644 --- a/.github/actions/docker-build/README.md +++ b/.github/actions/docker-build/README.md @@ -20,6 +20,7 @@ This action bundle all the steps needed to build a docker image in your workflow | `cache` | No | Bool | Enable/disable remote cache. | | `build-args` | No | String | Additional build arguments. | | `platforms` | No | CSV | Target platforms. | +| `push` | No | Bool | Push image to registry. | ## Examples diff --git a/.github/actions/docker-build/action.yml b/.github/actions/docker-build/action.yml index 6b3d792..ca9dae6 100644 --- a/.github/actions/docker-build/action.yml +++ b/.github/actions/docker-build/action.yml @@ -25,6 +25,9 @@ inputs: required: false platforms: required: false + push: + required: false + deafault: true outputs: image-id: @@ -84,7 +87,7 @@ runs: target: ${{ inputs.stage }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - push: true + push: ${{ inputs.push }} cache-from: type=registry,ref=${{ steps.generate.outputs.image }}:buildcache cache-to: type=registry,ref=${{ steps.generate.outputs.image }}:buildcache,mode=max file: ${{ inputs.dockerfile }} @@ -100,7 +103,7 @@ runs: target: ${{ inputs.stage }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - push: true + push: ${{ inputs.push }} no-cache: true file: ${{ inputs.dockerfile }} build-args: ${{ inputs.build-args }}