$ show docker/bake-action
This is a GitHub Action that wraps Docker's `buildx bake` command, enabling multi-target Docker builds within CI workflows. It parses bake definition files (HCL or JSON), translates GitHub Action inputs into bake arguments (including support for provenance, SBOM, custom outputs, and build checks), executes the build, and generates a detailed job summary with optional build record upload. The action integrates tightly with the `@docker/actions-toolkit` library to manage Docker contexts, builder instances, and GitHub API interactions. While the core action is specific to GitHub Actions, a subaction (`subaction/matrix`) demonstrates a reusable pattern for generating a multi-dimensional GitHub Actions matrix from a bake definition's targets and fields, which can be extracted and adapted for other CI systems or deployment pipelines. The repository is well-maintained with daily dependency updates and comprehensive CI tests across various buildx versions and scenarios.
The LLM identified 1 files worth highlighting for reuse:
A self-contained subaction that parses a Docker buildx bake definition (via `docker buildx bake --print`) and generates a JSON matrix for GitHub Actions. It handles targets with multiple fields (like platforms) and supports matrix expansion on array-valued fields. This component is isolated, requires minimal dependencies (only `@actions/core` and `@actions/exec`), and can be extracted into a standalone tool or adapted for any system that needs to decompose a bake definition into parallel build entries.