Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions actions/docker-build-push-image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:

| Name | Type | Description |
| ----------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `annotations` | String | List of custom annotations to add to the image as metadata. Passed to `docker/build-push-action`. |
| `build-args` | String | List of arguments necessary for the Docker image to be built. Passed to `docker/build-push-action`. |
| `build-contexts` | String | List of additional build contexts (e.g., name=path). Passed to `docker/build-push-action`. |
| `buildkitd-config` | String | The buildkitd config file to use. Defaults to `/etc/buildkitd.toml` if you're using Grafana's self-hosted runners. Passed to `docker/setup-buildx-action`. |
Expand Down
6 changes: 6 additions & 0 deletions actions/docker-build-push-image/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Build and Push Docker Image
description: Composite action to push a docker image to GAR or DockerHub

inputs:
annotations:
description: |
List of custom annotations to add to the image as metadata (passed to `docker/build-push-action`).
Passed to `docker/build-push-action`.
build-args:
description: |
List of arguments necessary for the Docker image to be built.
Expand Down Expand Up @@ -264,6 +268,7 @@ runs:
id: meta
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
with:
annotations: ${{ inputs.annotations }}
images: ${{ steps.setup-vars.outputs.images }}
labels: ${{ inputs.labels }}
tags: ${{ inputs.tags }}
Expand Down Expand Up @@ -326,6 +331,7 @@ runs:
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
id: build
with:
annotations: ${{ steps.meta.outputs.annotations }}
build-args: ${{ inputs.build-args }}
build-contexts: ${{ inputs.build-contexts }}
cache-from: ${{ inputs.cache-from }}
Expand Down
Loading