{"id":15019971,"url":"https://github.com/docker/bake-action","last_synced_at":"2026-03-05T20:55:34.522Z","repository":{"id":37785404,"uuid":"301684204","full_name":"docker/bake-action","owner":"docker","description":"GitHub Action to use Docker Buildx Bake as a high-level build command","archived":false,"fork":false,"pushed_at":"2025-04-01T20:04:31.000Z","size":36954,"stargazers_count":234,"open_issues_count":18,"forks_count":31,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-03T04:05:53.515Z","etag":null,"topics":["bake","buildx","docker","github-actions","github-actions-docker"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/docker-buildx-bake","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/docker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-06T10:01:56.000Z","updated_at":"2025-04-02T22:37:39.000Z","dependencies_parsed_at":"2024-02-27T16:29:24.613Z","dependency_job_id":"f474dc1f-b9a1-44ee-9bf6-7facd7f3d6d8","html_url":"https://github.com/docker/bake-action","commit_stats":{"total_commits":306,"total_committers":9,"mean_commits":34.0,"dds":0.3104575163398693,"last_synced_commit":"1677316f88b1bf0cd0c944aecfcd53a07280cf8e"},"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docker%2Fbake-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docker%2Fbake-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docker%2Fbake-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docker%2Fbake-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/docker","download_url":"https://codeload.github.com/docker/bake-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248741147,"owners_count":21154249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bake","buildx","docker","github-actions","github-actions-docker"],"created_at":"2024-09-24T19:54:23.568Z","updated_at":"2026-03-05T20:55:34.499Z","avatar_url":"https://github.com/docker.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GitHub release](https://img.shields.io/github/release/docker/bake-action.svg?style=flat-square)](https://github.com/docker/bake-action/releases/latest)\n[![GitHub marketplace](https://img.shields.io/badge/marketplace-docker--buildx--bake-blue?logo=github\u0026style=flat-square)](https://github.com/marketplace/actions/docker-buildx-bake)\n[![CI workflow](https://img.shields.io/github/actions/workflow/status/docker/bake-action/ci.yml?branch=master\u0026label=ci\u0026logo=github\u0026style=flat-square)](https://github.com/docker/bake-action/actions?workflow=ci)\n[![Test workflow](https://img.shields.io/github/actions/workflow/status/docker/bake-action/test.yml?branch=master\u0026label=test\u0026logo=github\u0026style=flat-square)](https://github.com/docker/bake-action/actions?workflow=test)\n[![Codecov](https://img.shields.io/codecov/c/github/docker/bake-action?logo=codecov\u0026style=flat-square)](https://codecov.io/gh/docker/bake-action)\n\n## About\n\nGitHub Action to use Docker [Buildx Bake](https://docs.docker.com/build/customize/bake/)\nas a high-level build command.\n\n![Screenshot](.github/bake-action.png)\n\n___\n\n* [Usage](#usage)\n  * [Git context](#git-context)\n  * [Path context](#path-context)\n* [Summaries](#summaries)\n* [Customizing](#customizing)\n  * [inputs](#inputs)\n  * [outputs](#outputs)\n  * [environment variables](#environment-variables)\n* [Subactions](#subactions)\n  * [`matrix`](subaction/matrix)\n* [Contributing](#contributing)\n\n## Usage\n\n### Git context\n\nSince `v6` this action uses the [Git context](https://docs.docker.com/build/bake/remote-definition/)\nto build from a remote bake definition by default like the [build-push-action](https://github.com/docker/build-push-action)\ndoes. This means that you don't need to use the [`actions/checkout`](https://github.com/actions/checkout/)\naction to check out the repository as [BuildKit](https://docs.docker.com/build/buildkit/)\nwill do this directly.\n\nThe git reference will be based on the [event that triggered your workflow](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows)\nand will result in the following context: `https://github.com/\u003cowner\u003e/\u003crepo\u003e.git#\u003cref\u003e`.\n\n```yaml\nname: ci\n\non:\n  push:\n\njobs:\n  bake:\n    runs-on: ubuntu-latest\n    steps:\n      -\n        name: Login to DockerHub\n        uses: docker/login-action@v3\n        with:\n          username: ${{ vars.DOCKERHUB_USERNAME }}\n          password: ${{ secrets.DOCKERHUB_TOKEN }}\n      -\n        name: Set up Docker Buildx\n        uses: docker/setup-buildx-action@v3\n      -\n        name: Build and push\n        uses: docker/bake-action@v6\n        with:\n          push: true\n          set: |\n            *.tags=user/app:latest\n```\n\nBe careful because **any file mutation in the steps that precede the build step\nwill be ignored, including processing of the `.dockerignore` file** since\nthe context is based on the Git reference. However, you can use the\n[Path context](#path-context) using the [`source` input](#inputs) alongside\nthe [`actions/checkout`](https://github.com/actions/checkout/) action to remove\nthis restriction.\n\nDefault Git context can also be provided using the [Handlebars template](https://handlebarsjs.com/guide/)\nexpression `{{defaultContext}}`. Here we can use it to provide a subdirectory\nto the default Git context:\n\n```yaml\n      -\n        name: Build and push\n        uses: docker/bake-action@v6\n        with:\n          source: \"{{defaultContext}}:mysubdir\"\n          push: true\n          set: |\n            *.tags=user/app:latest\n```\n\nBuilding from the current repository automatically uses the `GITHUB_TOKEN`\nsecret that GitHub [automatically creates for workflows](https://docs.github.com/en/actions/security-guides/automatic-token-authentication),\nso you don't need to pass that manually. If you want to authenticate against\nanother private repository for remote definitions, you can set the\n[`BUILDX_BAKE_GIT_AUTH_TOKEN` environment variable](https://docs.docker.com/build/building/variables/#buildx_bake_git_auth_token).\n\n\u003e [!NOTE]\n\u003e Supported since Buildx 0.14.0\n\n```yaml\n      -\n        name: Build and push\n        uses: docker/bake-action@v6\n        with:\n          push: true\n          set: |\n            *.tags=user/app:latest\n        env:\n          BUILDX_BAKE_GIT_AUTH_TOKEN: ${{ secrets.MYTOKEN }}\n```\n\n### Path context\n\n```yaml\nname: ci\n\non:\n  push:\n\njobs:\n  bake:\n    runs-on: ubuntu-latest\n    steps:\n      -\n        name: Checkout\n        uses: actions/checkout@v4\n      -\n        name: Login to DockerHub\n        uses: docker/login-action@v3\n        with:\n          username: ${{ vars.DOCKERHUB_USERNAME }}\n          password: ${{ secrets.DOCKERHUB_TOKEN }}\n      -\n        name: Set up Docker Buildx\n        uses: docker/setup-buildx-action@v3\n      -\n        name: Build and push\n        uses: docker/bake-action@v6\n        with:\n          source: .\n          push: true\n          set: |\n            *.tags=user/app:latest\n```\n\n## Summaries\n\nThis action generates a [job summary](https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/)\nthat provides a detailed overview of the build execution. The summary shows an\noverview of all the steps executed during the build, including the build\ninputs, bake definition, and eventual errors.\n\n![build-push-action job summary](./.github/bake-summary.png)\n\nThe summary also includes a link for downloading a build record archive with\nadditional details about the build execution for all the bake targets,\nincluding build stats, logs, outputs, and more. The build record can be\nimported to Docker Desktop for inspecting the build in greater detail.\n\n\u003e [!WARNING]\n\u003e\n\u003e If you're using the [`actions/download-artifact`](https://github.com/actions/download-artifact)\n\u003e action in your workflow, you need to ignore the build record artifacts\n\u003e if `name` and `pattern` inputs are not specified ([defaults to download all artifacts](https://github.com/actions/download-artifact?tab=readme-ov-file#download-all-artifacts) of the workflow),\n\u003e otherwise the action will fail:\n\u003e ```yaml\n\u003e - uses: actions/download-artifact@v4\n\u003e   with:\n\u003e     pattern: \"!*.dockerbuild\"\n\u003e ```\n\u003e More info: https://github.com/actions/toolkit/pull/1874\n\nSummaries are enabled by default, but can be disabled with the\n`DOCKER_BUILD_SUMMARY` [environment variable](#environment-variables).\n\nFor more information about summaries, refer to the\n[documentation](https://docs.docker.com/go/build-summary/).\n\n## Customizing\n\n### inputs\n\nThe following inputs can be used as `step.with` keys\n\n\u003e `List` type is a newline-delimited string\n\u003e ```yaml\n\u003e set: target.args.mybuildarg=value\n\u003e ```\n\u003e ```yaml\n\u003e set: |\n\u003e   target.args.mybuildarg=value\n\u003e   foo*.args.mybuildarg=value\n\u003e ```\n\n\u003e `CSV` type is a comma-delimited string\n\u003e ```yaml\n\u003e targets: default,release\n\u003e ```\n\n| Name           | Type        | Description                                                                                                                                                        |\n|----------------|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `builder`      | String      | Builder instance (see [setup-buildx](https://github.com/docker/setup-buildx-action) action)                                                                        |\n| `workdir`      | String      | Working directory of execution                                                                                                                                     |\n| `source`       | String      | Context to build from. Can be either local (`.`) or a [remote bake definition](https://docs.docker.com/build/bake/remote-definition/)                              |\n| `allow`        | List/CSV    | Allow build to access specified resources (e.g., `network.host`)                                                                                                   |\n| `call`         | String      | Set method for evaluating build (e.g., check)                                                                                                                      |\n| `files`        | List/CSV    | List of [bake definition files](https://docs.docker.com/build/customize/bake/file-definition/)                                                                     |\n| `no-cache`     | Bool        | Do not use cache when building the image (default `false`)                                                                                                         |\n| `pull`         | Bool        | Always attempt to pull a newer version of the image (default `false`)                                                                                              |\n| `load`         | Bool        | Load is a shorthand for `--set=*.output=type=docker` (default `false`)                                                                                             |\n| `provenance`   | Bool/String | [Provenance](https://docs.docker.com/build/attestations/slsa-provenance/) is a shorthand for `--set=*.attest=type=provenance`                                      |\n| `push`         | Bool        | Push is a shorthand for `--set=*.output=type=registry` (default `false`)                                                                                           |\n| `sbom`         | Bool/String | [SBOM](https://docs.docker.com/build/attestations/sbom/) is a shorthand for `--set=*.attest=type=sbom`                                                             |\n| `set`          | List        | List of [targets values to override](https://docs.docker.com/engine/reference/commandline/buildx_bake/#set) (e.g., `targetpattern.key=value`)                      |\n| `targets`      | List/CSV    | List of bake targets (`default` target used if empty)                                                                                                              |\n| `github-token` | String      | API token used to authenticate to a Git repository for [remote definitions](https://docs.docker.com/build/bake/remote-definition/) (default `${{ github.token }}`) |\n\n### outputs\n\nThe following outputs are available\n\n| Name       | Type | Description           |\n|------------|------|-----------------------|\n| `metadata` | JSON | Build result metadata |\n\n### environment variables\n\n| Name                                 | Type   | Default | Description                                                                                                                                                                                                                                                        |\n|--------------------------------------|--------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `DOCKER_BUILD_CHECKS_ANNOTATIONS`    | Bool   | `true`  | If `false`, GitHub annotations are not generated for [build checks](https://docs.docker.com/build/checks/)                                                                                                                                                         |\n| `DOCKER_BUILD_SUMMARY`               | Bool   | `true`  | If `false`, [build summary](https://docs.docker.com/build/ci/github-actions/build-summary/) generation is disabled                                                                                                                                                 |\n| `DOCKER_BUILD_RECORD_UPLOAD`         | Bool   | `true`  | If `false`, build record upload as [GitHub artifact](https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts) is disabled                                                                                                            |\n| `DOCKER_BUILD_RECORD_RETENTION_DAYS` | Number |         | Duration after which build record artifact will expire in days. Defaults to repository/org [retention settings](https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#artifact-and-log-retention-policy) if unset or `0` |\n\n## Subactions\n\n* [`matrix`](subaction/matrix)\n\n## Contributing\n\nWant to contribute? Awesome! You can find information about contributing to\nthis project in the [CONTRIBUTING.md](/.github/CONTRIBUTING.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocker%2Fbake-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdocker%2Fbake-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocker%2Fbake-action/lists"}