Skip to content

Commit fd2e2da

Browse files
feat(push-to-gar-docker): add target input for multi-stage builds (#904)
* Add target to push-to-gar-docker action * apply prettier format to README
1 parent 801040d commit fd2e2da

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

actions/push-to-gar-docker/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ input.
7171
| `docker-buildx-driver` | String | The [driver](https://github.com/docker/setup-buildx-action/tree/v3/?tab=readme-ov-file#customizing) to use for Docker Buildx |
7272
| `repository_name` | String | Override the 'repo_name' which is included as part of the GAR repository name. Only necessary when the GAR includes a repo name that doesn't match the GitHub repo name. |
7373
| `labels` | List | List of custom labels to add to the image as metadata (see the [metadata-action](https://github.com/docker/metadata-action?tab=readme-ov-file#inputs)) for details |
74+
| `target` | String | Name of the [build stage](https://docs.docker.com/build/building/multi-stage/) to target. |
7475

7576
[mda]: https://github.com/docker/metadata-action?tab=readme-ov-file#tags-input
7677

actions/push-to-gar-docker/action.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ inputs:
6868
description: |
6969
List of custom labels to add to the image as metadata.
7070
required: false
71+
target:
72+
description: |
73+
Sets the target stage to build
74+
required: false
7175

7276
outputs:
7377
version:
@@ -164,6 +168,7 @@ runs:
164168
push: ${{ inputs.push == 'true' }}
165169
tags: ${{ steps.meta.outputs.tags }}
166170
labels: ${{ inputs.labels }}
171+
target: ${{ inputs.target }}
167172
cache-from: ${{ inputs.cache-from }}
168173
cache-to: ${{ inputs.cache-to }}
169174
file: ${{ inputs.file }}

0 commit comments

Comments
 (0)