Action to build an image with Docker for a specific platform
If default GitHub token is used, the following permissions are required:
permissions:
contents: read
packages: write
- uses: hoverkraft-tech/ci-github-container@0.20.2
with:
# Description: OCI registry where to pull and push images
#
# Default: ghcr.io
oci-registry: ""
# Description: Username used to log against the OCI registry. See
# <https://github.com/docker/login-action#usage>.
#
# Default: $
oci-registry-username: ""
# Description: Password or personal access token used to log against the OCI
# registry. Can be passed in using "secrets.GITHUB_TOKEN". See
# <https://github.com/docker/login-action#usage>.
#
# Default: $
oci-registry-password: ""
# Description: Repository name. Example: 'my-org/my-repo'. See
# [Docker get-image-metadata action](/ci-github-container/actions/docker/get-image-metadata/).
#
# Default: $
repository: ""
# Description: Additional image name. Example: 'application'. See
# [Docker get-image-metadata action](/ci-github-container/actions/docker/get-image-metadata/).
#
image: ""
# Description: Force image tag to publish
#
tag: ""
# Description: Platform to build for. See
# <https://github.com/docker/build-push-action#inputs>.
#
platform: ""
# Description: Build's context is the set of files located in the specified PATH
# or URL. See <https://github.com/docker/build-push-action#inputs>.
#
# Default: .
context: ""
# Description: Location of Dockerfile (defaults to Dockerfile). See
# <https://github.com/docker/build-push-action#inputs>.
#
# Default: Dockerfile
dockerfile: ""
# Description: List of build-time variables. See
# <https://github.com/docker/build-push-action#inputs>.
#
build-args: ""
# Description: Sets the target stage to build. See
# <https://github.com/docker/build-push-action#inputs>.
#
target: ""
# Description: List of secrets to expose to the build. See
# <https://docs.docker.com/build/ci/github-actions/secrets/>.
#
secrets: ""
Input | Description | Default | Required |
---|---|---|---|
oci-registry |
OCI registry where to pull and push images | ghcr.io |
true |
oci-registry-username |
Username used to log against the OCI registry. See https://github.com/docker/login-action#usage. |
$ |
true |
oci-registry-password |
Password or personal access token used to log against the OCI registry. Can be passed in using “secrets.GITHUB_TOKEN”. See https://github.com/docker/login-action#usage. |
$ |
true |
repository |
Repository name. Example: ‘my-org/my-repo’. See Docker get-image-metadata action. |
$ |
false |
image |
Additional image name. Example: ‘application’. See Docker get-image-metadata action. |
false | |
tag |
Force image tag to publish | false | |
platform |
Platform to build for. See https://github.com/docker/build-push-action#inputs. |
true | |
context |
Build’s context is the set of files located in the specified PATH or URL. See https://github.com/docker/build-push-action#inputs. |
. |
false |
dockerfile |
Location of Dockerfile (defaults to Dockerfile). See https://github.com/docker/build-push-action#inputs. |
Dockerfile |
false |
build-args |
List of build-time variables. See https://github.com/docker/build-push-action#inputs. |
false | |
target |
Sets the target stage to build. See https://github.com/docker/build-push-action#inputs. |
false | |
secrets |
List of secrets to expose to the build. See https://docs.docker.com/build/ci/github-actions/secrets/. |
false |
Output | Description |
---|---|
built-image |
Built image data. Example: { “name”: “application”, “registry”: “ghcr.io”, “repository”: “my-org/my-repo/application”, “tags”: [ “pr-63-5222075”, “pr-63” ], “images”: [ “ghcr.io/my-org/my-repo/application:pr-63-5222075”, “ghcr.io/my-org/my-repo/application:pr-63” ], “digests”: [ “ghcr.io/my-org/my-repo/application@sha256:d31aa93410434ac9dcfc9179cac2cb1fd4d7c27f11527addc40299c7c675f49d” ], “annotations”: { “org.opencontainers.image.created”: “2021-09-30T14:00:00Z”, “org.opencontainers.image.description”: “Application image” } } |