2020-08-17 18:26:35 +02:00
|
|
|
# https://help.github.com/en/articles/metadata-syntax-for-github-actions
|
2020-09-09 00:03:42 +02:00
|
|
|
name: Build and push Docker images
|
2020-08-17 18:26:35 +02:00
|
|
|
description: Build and push Docker images with Buildx
|
2020-08-16 00:36:41 +02:00
|
|
|
author: docker
|
2020-03-16 17:51:17 +01:00
|
|
|
branding:
|
|
|
|
icon: 'anchor'
|
|
|
|
color: 'blue'
|
2020-08-16 00:36:41 +02:00
|
|
|
|
2020-03-05 16:52:30 +01:00
|
|
|
inputs:
|
2022-01-31 11:47:45 +01:00
|
|
|
add-hosts:
|
|
|
|
description: "List of a customs host-to-IP mapping (e.g., docker:10.180.0.1)"
|
2022-01-30 18:33:31 +01:00
|
|
|
required: false
|
2021-04-06 13:54:58 +02:00
|
|
|
allow:
|
2021-11-16 07:19:27 +01:00
|
|
|
description: "List of extra privileged entitlement (e.g., network.host,security.insecure)"
|
2021-04-06 13:54:58 +02:00
|
|
|
required: false
|
2023-01-11 12:12:09 +01:00
|
|
|
attests:
|
|
|
|
description: "List of attestation parameters (e.g., type=sbom,generator=image)"
|
|
|
|
required: false
|
2021-04-06 13:54:58 +02:00
|
|
|
build-args:
|
|
|
|
description: "List of build-time variables"
|
|
|
|
required: false
|
2022-03-14 20:09:10 +01:00
|
|
|
build-contexts:
|
|
|
|
description: "List of additional build contexts (e.g., name=path)"
|
|
|
|
required: false
|
2020-08-16 05:53:50 +02:00
|
|
|
builder:
|
|
|
|
description: "Builder instance"
|
|
|
|
required: false
|
2021-04-06 13:54:58 +02:00
|
|
|
cache-from:
|
2021-11-16 07:19:27 +01:00
|
|
|
description: "List of external cache sources for buildx (e.g., user/app:cache, type=local,src=path/to/dir)"
|
2021-04-06 13:54:58 +02:00
|
|
|
required: false
|
|
|
|
cache-to:
|
2021-11-16 07:19:27 +01:00
|
|
|
description: "List of cache export destinations for buildx (e.g., user/app:cache, type=local,dest=path/to/dir)"
|
|
|
|
required: false
|
|
|
|
cgroup-parent:
|
|
|
|
description: "Optional parent cgroup for the container used in the build"
|
2021-04-06 13:54:58 +02:00
|
|
|
required: false
|
2020-08-16 00:36:41 +02:00
|
|
|
context:
|
|
|
|
description: "Build's context is the set of files located in the specified PATH or URL"
|
2020-03-05 16:52:30 +01:00
|
|
|
required: false
|
2020-08-16 00:36:41 +02:00
|
|
|
file:
|
|
|
|
description: "Path to the Dockerfile"
|
2020-03-05 16:52:30 +01:00
|
|
|
required: false
|
2020-08-16 00:36:41 +02:00
|
|
|
labels:
|
2020-08-17 22:18:15 +02:00
|
|
|
description: "List of metadata for an image"
|
2020-03-05 16:52:30 +01:00
|
|
|
required: false
|
2021-04-06 13:54:58 +02:00
|
|
|
load:
|
|
|
|
description: "Load is a shorthand for --output=type=docker"
|
2020-03-05 16:52:30 +01:00
|
|
|
required: false
|
2020-08-16 00:36:41 +02:00
|
|
|
default: 'false'
|
2021-04-06 14:49:15 +02:00
|
|
|
network:
|
|
|
|
description: "Set the networking mode for the RUN instructions during build"
|
|
|
|
required: false
|
2020-08-16 00:36:41 +02:00
|
|
|
no-cache:
|
|
|
|
description: "Do not use cache when building the image"
|
2020-03-05 16:52:30 +01:00
|
|
|
required: false
|
2020-08-16 00:36:41 +02:00
|
|
|
default: 'false'
|
2022-07-18 17:24:11 +02:00
|
|
|
no-cache-filters:
|
|
|
|
description: "Do not cache specified stages"
|
|
|
|
required: false
|
2021-04-06 13:54:58 +02:00
|
|
|
outputs:
|
|
|
|
description: "List of output destinations (format: type=local,dest=path)"
|
|
|
|
required: false
|
2020-08-16 00:36:41 +02:00
|
|
|
platforms:
|
2020-08-17 22:18:15 +02:00
|
|
|
description: "List of target platforms for build"
|
2020-03-05 16:52:30 +01:00
|
|
|
required: false
|
2023-01-11 12:12:09 +01:00
|
|
|
provenance:
|
|
|
|
description: "Generate provenance attestation for the build (shorthand for --attest=type=provenance)"
|
|
|
|
required: false
|
2021-04-06 13:54:58 +02:00
|
|
|
pull:
|
2022-03-14 20:09:10 +01:00
|
|
|
description: "Always attempt to pull all referenced images"
|
2020-03-05 16:52:30 +01:00
|
|
|
required: false
|
2020-08-16 00:36:41 +02:00
|
|
|
default: 'false'
|
|
|
|
push:
|
2020-08-16 17:18:08 +02:00
|
|
|
description: "Push is a shorthand for --output=type=registry"
|
2020-04-22 17:34:18 +02:00
|
|
|
required: false
|
2020-08-16 00:36:41 +02:00
|
|
|
default: 'false'
|
2023-01-11 12:12:09 +01:00
|
|
|
sbom:
|
|
|
|
description: "Generate SBOM attestation for the build (shorthand for --attest=type=sbom)"
|
|
|
|
required: false
|
2020-09-02 10:07:11 +02:00
|
|
|
secrets:
|
2021-11-16 07:19:27 +01:00
|
|
|
description: "List of secrets to expose to the build (e.g., key=string, GIT_AUTH_TOKEN=mytoken)"
|
2020-09-02 10:07:11 +02:00
|
|
|
required: false
|
2023-09-26 16:34:10 +02:00
|
|
|
secret-envs:
|
2023-10-12 14:32:49 +02:00
|
|
|
description: "List of secret env vars to expose to the build (e.g., key=envname, MY_SECRET=MY_ENV_VAR)"
|
2023-09-26 16:34:10 +02:00
|
|
|
required: false
|
2021-02-16 11:56:02 +01:00
|
|
|
secret-files:
|
2021-11-16 07:19:27 +01:00
|
|
|
description: "List of secret files to expose to the build (e.g., key=filename, MY_SECRET=./secret.txt)"
|
|
|
|
required: false
|
|
|
|
shm-size:
|
|
|
|
description: "Size of /dev/shm (e.g., 2g)"
|
2020-09-22 20:49:18 +02:00
|
|
|
required: false
|
2020-09-11 01:23:49 +02:00
|
|
|
ssh:
|
2020-10-28 19:40:11 +01:00
|
|
|
description: "List of SSH agent socket or keys to expose to the build"
|
2020-09-11 01:23:49 +02:00
|
|
|
required: false
|
2021-04-06 13:54:58 +02:00
|
|
|
tags:
|
|
|
|
description: "List of tags"
|
|
|
|
required: false
|
|
|
|
target:
|
|
|
|
description: "Sets the target stage to build"
|
|
|
|
required: false
|
2021-11-16 07:19:27 +01:00
|
|
|
ulimit:
|
|
|
|
description: "Ulimit options (e.g., nofile=1024:1024)"
|
|
|
|
required: false
|
2021-02-16 11:56:02 +01:00
|
|
|
github-token:
|
|
|
|
description: "GitHub Token used to authenticate against a repository for Git context"
|
|
|
|
default: ${{ github.token }}
|
|
|
|
required: false
|
2020-08-16 00:36:41 +02:00
|
|
|
|
|
|
|
outputs:
|
2022-03-14 19:30:50 +01:00
|
|
|
imageid:
|
|
|
|
description: 'Image ID'
|
2020-08-16 00:36:41 +02:00
|
|
|
digest:
|
2022-03-14 19:30:50 +01:00
|
|
|
description: 'Image digest'
|
2021-08-16 23:44:13 +02:00
|
|
|
metadata:
|
|
|
|
description: 'Build result metadata'
|
2020-08-16 00:36:41 +02:00
|
|
|
|
|
|
|
runs:
|
2023-09-07 12:21:51 +02:00
|
|
|
using: 'node20'
|
2020-08-16 00:36:41 +02:00
|
|
|
main: 'dist/index.js'
|
2020-09-02 10:07:11 +02:00
|
|
|
post: 'dist/index.js'
|