About
GitHub Action to use Docker Buildx Bake as a high-level build command.
If you are interested, check out my other :octocat: GitHub Actions!
Usage
name: ci
on:
pull_request:
branches: master
push:
branches: master
tags:
jobs:
bake:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
id: 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: crazy-max/ghaction-docker-buildx-bake@master
with:
builder: ${{ steps.buildx.outputs.name }}
push: true
files: |
./config.hcl
targets: |
default
release
Customizing
inputs
Following inputs can be used as step.with keys
| Name | Type | Description |
|---|---|---|
builder |
String | Builder instance (see setup-buildx action) |
files |
List | List of bake definition files |
targets |
List | 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 |
CSV | List of targets values to override (eg: targetpattern.key=value) |
Listtype can be a comma or newline-delimited stringtargets: default,releasetargets: | default release
CSVtype must be a newline-delimited stringset: target.args.mybuildarg=valueset: | target.args.mybuildarg=value foo*.args.mybuildarg=value
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"
Limitation
This action is only available for Linux virtual environments.
How can I help?
All kinds of contributions are welcome 🙌! The most basic way to show your support is to star 🌟 the project, or to raise issues 💬 You can also support this project by becoming a sponsor on GitHub 👏 or by making a Paypal donation to ensure this journey continues indefinitely! 🚀
Thanks again for your support, it is much appreciated! 🙏
License
MIT. See LICENSE for more details.