Skip to content

Commit

Permalink
Merge pull request #5 from cern-sis/push-input
Browse files Browse the repository at this point in the history
docker-build: addition of `push` input
  • Loading branch information
drjova authored Jul 16, 2024
2 parents 4c4ba1f + a18f811 commit 5560536
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/actions/docker-build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 5 additions & 2 deletions .github/actions/docker-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ inputs:
required: false
platforms:
required: false
push:
required: false
deafault: true

outputs:
image-id:
Expand Down Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down

0 comments on commit 5560536

Please sign in to comment.