cff9398622
chore: github form templates |
||
---|---|---|
.github | ||
__mocks__/@actions | ||
__tests__ | ||
dist | ||
src | ||
test | ||
.dockerignore | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc.json | ||
.gitattributes | ||
.gitignore | ||
.prettierrc.json | ||
action.yml | ||
codecov.yml | ||
dev.Dockerfile | ||
docker-bake.hcl | ||
jest.config.ts | ||
LICENSE | ||
package.json | ||
README.md | ||
tsconfig.json | ||
yarn.lock |
About
GitHub Action to use Docker Buildx Bake as a high-level build command.
Usage
name: ci
on:
push:
branches:
- 'master'
jobs:
bake:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/bake-action@v4
with:
push: true
Customizing
inputs
Following inputs can be used as step.with
keys
List
type is a newline-delimited stringset: target.args.mybuildarg=value
set: | target.args.mybuildarg=value foo*.args.mybuildarg=value
CSV
type is a comma-delimited stringtargets: default,release
Name | Type | Description |
---|---|---|
builder |
String | Builder instance (see setup-buildx action) |
files |
List/CSV | List of bake definition files |
workdir |
String | Working directory of execution |
targets |
List/CSV | List of bake targets (default target used if empty) |
no-cache |
Bool | Do not use cache when building the image (default false ) |
pull |
Bool | Always attempt to pull a newer version of the image (default false ) |
load |
Bool | Load is a shorthand for --set=*.output=type=docker (default false ) |
provenance |
Bool/String | Provenance is a shorthand for --set=*.attest=type=provenance |
push |
Bool | Push is a shorthand for --set=*.output=type=registry (default false ) |
sbom |
Bool/String | SBOM is a shorthand for --set=*.attest=type=sbom |
set |
List | List of targets values to override (eg: targetpattern.key=value ) |
source |
String | Remote bake definition to build from |
outputs
The following outputs are available
Name | Type | Description |
---|---|---|
metadata |
JSON | Build result metadata |
Contributing
Want to contribute? Awesome! You can find information about contributing to this project in the CONTRIBUTING.md