GitHub Action to use Docker Buildx Bake as a high-level build command
Перейти к файлу
CrazyMax bbd00fcb02
Merge pull request #59 from crazy-max/outputs
Enhance outputs display
2022-02-09 11:42:06 +01:00
.github Fix Dependabot labels 2021-09-03 13:13:19 +02:00
__tests__ Add `metadata` output 2021-09-01 22:22:37 +02:00
dist Enhance outputs display 2022-02-09 11:36:24 +01:00
hack dev: update workflow 2021-11-16 21:24:44 +01:00
src Enhance outputs display 2022-02-09 11:36:24 +01:00
test Typo 2020-10-08 01:00:09 +02:00
.dockerignore Enhance workflow 2021-03-31 15:23:37 +02:00
.editorconfig Initial commit 2020-10-08 00:52:52 +02:00
.gitattributes Initial commit 2020-10-08 00:52:52 +02:00
.gitignore Update gitignore 2020-12-19 03:24:28 +01:00
.prettierrc.json Handle git sha version of buildx 2021-07-01 15:48:15 +02:00
LICENSE Initial commit 2020-10-08 00:52:52 +02:00
README.md Add `metadata` output 2021-09-01 22:22:37 +02:00
action.yml Add `metadata` output 2021-09-01 22:22:37 +02:00
codecov.yml Handle git sha version of buildx 2021-07-01 15:48:15 +02:00
docker-bake.hcl dev: update workflow 2021-11-16 21:24:44 +01:00
jest.config.js Use built-in `getExecOutput` 2021-06-08 20:40:26 +02:00
package.json Bump @actions/core from 1.5.0 to 1.6.0 2021-09-28 23:06:58 +00:00
tsconfig.json Initial commit 2020-10-08 00:52:52 +02:00
yarn.lock Bump @actions/core from 1.5.0 to 1.6.0 2021-09-28 23:06:58 +00:00

README.md

GitHub release GitHub marketplace Test workflow Codecov

🧪 Experimental

This repository is considered EXPERIMENTAL and under active development until further notice. It is subject to non-backward compatible changes or removal in any future version so you should pin to a specific tag/commit of this action in your workflow (i.e docker/bake-action@v1.1.3).

About

GitHub Action to use Docker Buildx Bake as a high-level build command.

Screenshot


Usage

name: ci

on:
  push:
    branches:
      - 'master'

jobs:
  bake:
    runs-on: ubuntu-latest
    steps:
      -
        name: Checkout
        uses: actions/checkout@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
      -
        name: Login to DockerHub
        uses: docker/login-action@v1 
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/bake-action@master
        with:
          push: true

Customizing

inputs

Following inputs can be used as step.with keys

List type is a newline-delimited string

set: target.args.mybuildarg=value
set: |
  target.args.mybuildarg=value
  foo*.args.mybuildarg=value  

CSV type is a comma-delimited string

targets: default,release
Name Type Description
builder String Builder instance (see setup-buildx action)
files List/CSV List of bake definition files
targets List/CSV List of bake targets
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)
push Bool Push is a shorthand for --set=*.output=type=registry (default false)
set List List of targets values to override (eg: targetpattern.key=value)

outputs

Following outputs are available

Name Type Description
metadata JSON Build result metadata

Keep up-to-date with GitHub Dependabot

Since Dependabot has native GitHub Actions support, to enable it on your GitHub repo all you need to do is add the .github/dependabot.yml file:

version: 2
updates:
  # Maintain dependencies for GitHub Actions
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "daily"