Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
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
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@v1
with:
files: |
./config.hcl
targets: |
release
push: true
Customizing
inputs
Following inputs can be used as step.with keys
Listtype is a newline-delimited stringset: target.args.mybuildarg=valueset: | target.args.mybuildarg=value foo*.args.mybuildarg=value
CSVtype 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 |
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) |
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.
Contributing
Want to contribute? Awesome! The most basic way to show your support is to star 🌟 the project, or to raise issues 💬. If you want to open a pull request, please read the contributing guidelines.
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.