celo-org/Build and Push Docker Image Using Composite Action
This composite action builds a Docker image from a specified Dockerfile and optionally pushes it to a remote registry. It supports multi-platform builds, caching, and includes optional tools like Trivy for vulnerability scanning.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| runner-platform | Specifies the platform of the GitHub runner for build testing. Commonly used to test builds on various architectures. Default is `linux/amd64`. | no | linux/amd64 |
| platforms | Comma-separated list of image platforms to target during the build process (e.g., `linux/amd64,linux/arm64`). | yes | linux/amd64 |
| context | The build context path for Docker. Typically, this is the directory where the Dockerfile and associated files are located. | yes | — |
| dockerfile | The path to the Dockerfile to use for building the image. This should be relative to the context path. | yes | — |
| push | Indicates whether the image should be pushed to the remote registry. Requires prior authentication to the registry. Either `push` or `load` must be set to `true`. | yes | true |
| build-args | A list of build-time variables to pass to the Docker build process. Use a comma-separated format. | no | — |
| registry | The registry to which the image will be pushed (e.g., `docker.io/my-repo` or `ghcr.io/my-org`). | yes | — |
| tags | A comma-separated list of tags to apply to the image. For example, `latest,v1.0,v1.0.0`. | yes | latest |
| summary | Enables the generation of a GitHub Action summary for the build process. | — | true |
| pr-comment | Enables posting comments on pull requests with details about the build process and results. | — | true |
| attestation | Enables artifact and SBOM attestation generation for the built image. | — | true |
Outputs
| name | description |
|---|---|
| app-name | The name of the Docker image without the registry. Useful for identifying the application name. |
| full-image-name | The full name of the Docker image, including the registry. This is useful for pulling or referencing the image. |