mirror of
https://github.com/ivuorinen/actions.git
synced 2026-01-26 03:23:59 +00:00
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
ivuorinen/actions/docker-build
Docker Build
Description
Builds a Docker image for multiple architectures with enhanced security and reliability.
Inputs
| name | description | required | default |
|---|---|---|---|
image-name |
The name of the Docker image to build. Defaults to the repository name. |
false |
"" |
tag |
The tag for the Docker image. Must follow semver or valid Docker tag format. |
true |
"" |
architectures |
Comma-separated list of architectures to build for. |
false |
linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 |
dockerfile |
Path to the Dockerfile |
false |
Dockerfile |
context |
Docker build context |
false |
. |
build-args |
Build arguments in format KEY=VALUE,KEY2=VALUE2 |
false |
"" |
cache-from |
External cache sources (e.g., type=registry,ref=user/app:cache) |
false |
"" |
push |
Whether to push the image after building |
false |
true |
max-retries |
Maximum number of retry attempts for build and push operations |
false |
3 |
Outputs
| name | description |
|---|---|
image-digest |
The digest of the built image |
metadata |
Build metadata in JSON format |
platforms |
Successfully built platforms |
Runs
This action is a composite action.
Usage
- uses: ivuorinen/actions/docker-build@main
with:
image-name:
# The name of the Docker image to build. Defaults to the repository name.
#
# Required: false
# Default: ""
tag:
# The tag for the Docker image. Must follow semver or valid Docker tag format.
#
# Required: true
# Default: ""
architectures:
# Comma-separated list of architectures to build for.
#
# Required: false
# Default: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
dockerfile:
# Path to the Dockerfile
#
# Required: false
# Default: Dockerfile
context:
# Docker build context
#
# Required: false
# Default: .
build-args:
# Build arguments in format KEY=VALUE,KEY2=VALUE2
#
# Required: false
# Default: ""
cache-from:
# External cache sources (e.g., type=registry,ref=user/app:cache)
#
# Required: false
# Default: ""
push:
# Whether to push the image after building
#
# Required: false
# Default: true
max-retries:
# Maximum number of retry attempts for build and push operations
#
# Required: false
# Default: 3