Compare commits

...

214 Commits

Author SHA1 Message Date
dependabot[bot] a73e3bdb6b chore(deps): Bump actions/checkout from 6.0.2 to 6.0.3
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.2 to 6.0.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/de0fac2e4500dabe0009e67214ff5f5447ce83dd...df4cb1c069e1874edd31b4311f1884172cec0e10)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-04 03:38:09 +00:00
CrazyMax b522ed9b9b Merge pull request #453 from crazy-max/yarn-update
update yarn to 4.15.0
2026-05-28 18:41:14 +02:00
CrazyMax 3807abb13c update yarn to 4.15.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-05-28 15:11:47 +02:00
CrazyMax b48e756491 Merge pull request #451 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.91.0
chore(deps): Bump @docker/actions-toolkit from 0.90.0 to 0.91.0
2026-05-28 10:40:54 +02:00
github-actions[bot] 16246e91d6 chore: update generated content 2026-05-28 08:18:46 +00:00
dependabot[bot] 78970d44df chore(deps): Bump @docker/actions-toolkit from 0.90.0 to 0.91.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.90.0 to 0.91.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.90.0...v0.91.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-version: 0.91.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-28 08:17:51 +00:00
CrazyMax 8d9e8e938e Merge pull request #452 from docker/dependabot/npm_and_yarn/tmp-0.2.7
chore(deps): Bump tmp from 0.2.5 to 0.2.7
2026-05-28 10:15:26 +02:00
CrazyMax ed9d2dc915 Merge pull request #450 from docker/sec-cli/ignore-scripts-fix-20260527-192659
ci: add ignore-scripts to Node package manager config (20260527-192659)
2026-05-28 09:49:39 +02:00
github-actions[bot] 73284d0e36 chore: update generated content 2026-05-28 03:12:49 +00:00
dependabot[bot] 1358ed6549 chore(deps): Bump tmp from 0.2.5 to 0.2.7
Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.5 to 0.2.7.
- [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/raszi/node-tmp/compare/v0.2.5...v0.2.7)

---
updated-dependencies:
- dependency-name: tmp
  dependency-version: 0.2.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-28 03:11:53 +00:00
securityeng-bot[bot] d9caed87ad ci: enforce ignore-scripts policy for Node package managers 2026-05-27 20:05:24 +00:00
CrazyMax d8437235bd Merge pull request #449 from docker/dependabot/github_actions/subaction/matrix/actions/github-script-9.0.0
chore(deps): Bump actions/github-script from 8.0.0 to 9.0.0 in /subaction/matrix
2026-05-26 20:11:10 +02:00
dependabot[bot] 6f2e2568d5 chore(deps): Bump actions/github-script in /subaction/matrix
Bumps [actions/github-script](https://github.com/actions/github-script) from 8.0.0 to 9.0.0.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/ed597411d8f924073f98dfc5c65a23a2325f34cd...3a2844b7e9c422d3c10d287c895573f7108da1b3)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: 9.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-26 17:14:51 +00:00
Tõnis Tiigi 4e2003362d Merge pull request #444 from crazy-max/dependabot-subdir
dependabot: scan matrix subaction
2026-05-26 10:12:12 -07:00
CrazyMax 319deeae86 Merge pull request #447 from docker/dependabot/github_actions/github/codeql-action-4.36.0
chore(deps): Bump github/codeql-action from 4.35.5 to 4.36.0
2026-05-26 09:47:18 +02:00
CrazyMax 7b33a5efc5 Merge pull request #446 from docker/dependabot/github_actions/docker/setup-buildx-action-4.1.0
chore(deps): Bump docker/setup-buildx-action from 4.0.0 to 4.1.0
2026-05-26 09:46:58 +02:00
CrazyMax 7155ebf2d8 Merge pull request #445 from docker/dependabot/github_actions/docker/metadata-action-6.1.0
chore(deps): Bump docker/metadata-action from 6.0.0 to 6.1.0
2026-05-26 09:46:38 +02:00
CrazyMax a3634cba36 Merge pull request #448 from docker/dependabot/github_actions/docker/bake-action-7.2.0
chore(deps): Bump docker/bake-action from 7.1.0 to 7.2.0
2026-05-26 09:30:53 +02:00
dependabot[bot] ef67877e47 chore(deps): Bump docker/bake-action from 7.1.0 to 7.2.0
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 7.1.0 to 7.2.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/a66e1c87e2eca0503c343edf1d208c716d54b8a8...6614cfa25eff9a0b2b2697efb0b6159e7680d584)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-version: 7.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-26 05:05:18 +00:00
dependabot[bot] 51998f2e23 chore(deps): Bump github/codeql-action from 4.35.5 to 4.36.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.35.5 to 4.36.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/9e0d7b8d25671d64c341c19c0152d693099fb5ba...7211b7c8077ea37d8641b6271f6a365a22a5fbfa)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.36.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-26 05:05:08 +00:00
dependabot[bot] c3213e2454 chore(deps): Bump docker/setup-buildx-action from 4.0.0 to 4.1.0
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd...d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-version: 4.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-26 05:03:41 +00:00
dependabot[bot] cfa1977d2c chore(deps): Bump docker/metadata-action from 6.0.0 to 6.1.0
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 6.0.0 to 6.1.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/030e881283bb7a6894de51c315a6bfe6a94e05cf...80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-26 05:03:27 +00:00
CrazyMax 67998fd5c4 dependabot: scan matrix subaction
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-05-23 02:05:24 +02:00
CrazyMax 6614cfa25e Merge pull request #425 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.88.0
chore(deps): Bump @docker/actions-toolkit from 0.87.0 to 0.90.0
2026-05-21 15:32:33 +02:00
github-actions[bot] 0a925a2f44 chore: update generated content 2026-05-21 13:29:22 +00:00
dependabot[bot] b9ca7428b9 chore(deps): Bump @docker/actions-toolkit from 0.87.0 to 0.90.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.87.0 to 0.90.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.87.0...v0.90.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-version: 0.88.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-21 13:28:23 +00:00
CrazyMax 48e6359a4a Merge pull request #429 from docker/dependabot/npm_and_yarn/fast-xml-parser-5.7.1
chore(deps): Bump fast-xml-parser from 5.5.9 to 5.8.0
2026-05-21 15:26:23 +02:00
github-actions[bot] d1523f495a chore: update generated content 2026-05-21 13:24:20 +00:00
dependabot[bot] a73f293b0b chore(deps): Bump fast-xml-parser from 5.5.9 to 5.8.0
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 5.5.9 to 5.8.0.
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5.5.9...v5.8.0)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-version: 5.7.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-21 13:23:23 +00:00
CrazyMax bc584acc2a Merge pull request #430 from docker/dependabot/npm_and_yarn/actions/core-3.0.1
chore(deps): Bump @actions/core from 3.0.0 to 3.0.1
2026-05-21 15:20:46 +02:00
github-actions[bot] 23050a11b3 chore: update generated content 2026-05-21 13:18:58 +00:00
dependabot[bot] 7ae1cf6599 chore(deps): Bump @actions/core from 3.0.0 to 3.0.1
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 3.0.0 to 3.0.1.
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-version: 3.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-21 13:18:03 +00:00
CrazyMax e7934f8394 Merge pull request #432 from docker/dependabot/npm_and_yarn/postcss-8.5.10
chore(deps): Bump postcss from 8.5.6 to 8.5.10
2026-05-21 15:15:59 +02:00
CrazyMax 2180af9b2d Merge pull request #436 from docker/dependabot/npm_and_yarn/fast-xml-builder-1.2.0
chore(deps): Bump fast-xml-builder from 1.1.4 to 1.2.0
2026-05-21 15:14:59 +02:00
CrazyMax 67520b7fff Merge pull request #439 from docker/dependabot/github_actions/actions/create-github-app-token-3.2.0
chore(deps): Bump actions/create-github-app-token from 3.1.1 to 3.2.0
2026-05-21 15:14:32 +02:00
dependabot[bot] bab4dca6e5 chore(deps): Bump actions/create-github-app-token from 3.1.1 to 3.2.0
Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Changelog](https://github.com/actions/create-github-app-token/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/create-github-app-token/compare/1b10c78c7865c340bc4f6099eb2f838309f1e8c3...bcd2ba49218906704ab6c1aa796996da409d3eb1)

---
updated-dependencies:
- dependency-name: actions/create-github-app-token
  dependency-version: 3.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-21 13:12:05 +00:00
CrazyMax 30365c9513 Merge pull request #437 from docker/dependabot/github_actions/crazy-max-dot-github-6667ecc476
chore(deps): Bump the crazy-max-dot-github group with 2 updates
2026-05-21 15:08:45 +02:00
CrazyMax d27056814b Merge pull request #443 from crazy-max/zizmor-fixes
ci: restrict update-dist GitHub App token scope
2026-05-21 14:57:12 +02:00
CrazyMax 55c6f41962 ci: restrict update-dist GitHub App token scope
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-05-21 14:19:42 +02:00
CrazyMax 96578ad44f Merge pull request #440 from docker/dependabot/npm_and_yarn/tar-7.5.15
chore(deps): Bump tar from 6.2.1 to 7.5.15
2026-05-21 14:14:17 +02:00
CrazyMax 394c7845c8 Merge pull request #441 from docker/dependabot/github_actions/github/codeql-action-4.35.5
chore(deps): Bump github/codeql-action from 4.35.2 to 4.35.5
2026-05-21 14:01:36 +02:00
CrazyMax 008fe0dad3 Merge pull request #442 from docker/dependabot/github_actions/codecov/codecov-action-6.0.1
chore(deps): Bump codecov/codecov-action from 6.0.0 to 6.0.1
2026-05-21 14:00:59 +02:00
dependabot[bot] 25a07aec84 chore(deps): Bump codecov/codecov-action from 6.0.0 to 6.0.1
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/57e3a136b779b570ffcdbf80b3bdc90e7fab3de2...e79a6962e0d4c0c17b229090214935d2e33f8354)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-20 05:06:59 +00:00
dependabot[bot] b0fda6d54b chore(deps): Bump github/codeql-action from 4.35.2 to 4.35.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.35.2 to 4.35.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/95e58e9a2cdfd71adc6e0353d5c52f41a045d225...9e0d7b8d25671d64c341c19c0152d693099fb5ba)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.35.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-19 09:49:21 +00:00
dependabot[bot] db33cb2356 chore(deps): Bump tar from 6.2.1 to 7.5.15
Bumps [tar](https://github.com/isaacs/node-tar) from 6.2.1 to 7.5.15.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v6.2.1...v7.5.15)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.15
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-15 00:38:44 +00:00
dependabot[bot] 263f1e5eaf chore(deps): Bump the crazy-max-dot-github group with 2 updates
Bumps the crazy-max-dot-github group with 2 updates: [crazy-max/.github/.github/workflows/pr-assign-author.yml](https://github.com/crazy-max/.github) and [crazy-max/.github/.github/workflows/zizmor.yml](https://github.com/crazy-max/.github).


Updates `crazy-max/.github/.github/workflows/pr-assign-author.yml` from 1.7.1 to 1.8.0
- [Release notes](https://github.com/crazy-max/.github/releases)
- [Commits](https://github.com/crazy-max/.github/compare/64a0bfaf6e6bb1c448d6e4c42b11034ee7094f16...9ba6e6f9450baf3b1237f8035c1fdc45932510bd)

Updates `crazy-max/.github/.github/workflows/zizmor.yml` from 1.7.1 to 1.8.0
- [Release notes](https://github.com/crazy-max/.github/releases)
- [Commits](https://github.com/crazy-max/.github/compare/64a0bfaf6e6bb1c448d6e4c42b11034ee7094f16...9ba6e6f9450baf3b1237f8035c1fdc45932510bd)

---
updated-dependencies:
- dependency-name: crazy-max/.github/.github/workflows/pr-assign-author.yml
  dependency-version: 1.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: crazy-max-dot-github
- dependency-name: crazy-max/.github/.github/workflows/zizmor.yml
  dependency-version: 1.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: crazy-max-dot-github
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-12 05:32:54 +00:00
github-actions[bot] 54ce3f462d chore: update generated content 2026-05-08 18:44:06 +00:00
dependabot[bot] 73ba2255c7 chore(deps): Bump fast-xml-builder from 1.1.4 to 1.2.0
Bumps [fast-xml-builder](https://github.com/NaturalIntelligence/fast-xml-builder) from 1.1.4 to 1.2.0.
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-builder/blob/main/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-builder/compare/v1.1.4...v1.2.0)

---
updated-dependencies:
- dependency-name: fast-xml-builder
  dependency-version: 1.2.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-08 18:42:57 +00:00
CrazyMax 4574eacfed Merge pull request #433 from docker/dependabot/github_actions/crazy-max-dot-github-a3893cf95f
chore(deps): Bump the crazy-max-dot-github group with 2 updates
2026-04-27 09:36:23 +02:00
dependabot[bot] 29fd3dbeee chore(deps): Bump the crazy-max-dot-github group with 2 updates
Bumps the crazy-max-dot-github group with 2 updates: [crazy-max/.github/.github/workflows/pr-assign-author.yml](https://github.com/crazy-max/.github) and [crazy-max/.github/.github/workflows/zizmor.yml](https://github.com/crazy-max/.github).


Updates `crazy-max/.github/.github/workflows/pr-assign-author.yml` from 1.7.0 to 1.7.1
- [Release notes](https://github.com/crazy-max/.github/releases)
- [Commits](https://github.com/crazy-max/.github/compare/4a17dbaa9ce13920fc5bb8824eb89c16301e5ab2...64a0bfaf6e6bb1c448d6e4c42b11034ee7094f16)

Updates `crazy-max/.github/.github/workflows/zizmor.yml` from 1.7.0 to 1.7.1
- [Release notes](https://github.com/crazy-max/.github/releases)
- [Commits](https://github.com/crazy-max/.github/compare/4a17dbaa9ce13920fc5bb8824eb89c16301e5ab2...64a0bfaf6e6bb1c448d6e4c42b11034ee7094f16)

---
updated-dependencies:
- dependency-name: crazy-max/.github/.github/workflows/pr-assign-author.yml
  dependency-version: 1.7.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: crazy-max-dot-github
- dependency-name: crazy-max/.github/.github/workflows/zizmor.yml
  dependency-version: 1.7.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: crazy-max-dot-github
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-24 23:42:36 +00:00
dependabot[bot] 981a3549aa chore(deps): Bump postcss from 8.5.6 to 8.5.10
Bumps [postcss](https://github.com/postcss/postcss) from 8.5.6 to 8.5.10.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.5.6...8.5.10)

---
updated-dependencies:
- dependency-name: postcss
  dependency-version: 8.5.10
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-24 17:40:35 +00:00
Tõnis Tiigi 9d83d006b8 Merge pull request #431 from crazy-max/esbuild
replace ncc with esbuild for action bundling
2026-04-24 10:38:23 -07:00
CrazyMax 9090ec1873 replace ncc with esbuild for action bundling
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-04-24 11:09:12 +02:00
CrazyMax 79995a2bc2 Merge pull request #427 from docker/dependabot/github_actions/actions/setup-node-6.4.0
chore(deps): Bump actions/setup-node from 6.3.0 to 6.4.0
2026-04-24 09:46:51 +02:00
CrazyMax f4721a19cb Merge pull request #428 from docker/dependabot/github_actions/crazy-max-dot-github-6f136b1f9e
chore(deps): Bump the crazy-max-dot-github group with 2 updates
2026-04-24 09:45:50 +02:00
dependabot[bot] a1bcdaa57b chore(deps): Bump the crazy-max-dot-github group with 2 updates
Bumps the crazy-max-dot-github group with 2 updates: [crazy-max/.github/.github/workflows/pr-assign-author.yml](https://github.com/crazy-max/.github) and [crazy-max/.github/.github/workflows/zizmor.yml](https://github.com/crazy-max/.github).


Updates `crazy-max/.github/.github/workflows/pr-assign-author.yml` from 1.6.0 to 1.7.0
- [Release notes](https://github.com/crazy-max/.github/releases)
- [Commits](https://github.com/crazy-max/.github/compare/d89fe92d808a15e2b2ed5cdb62db7c172c31410d...4a17dbaa9ce13920fc5bb8824eb89c16301e5ab2)

Updates `crazy-max/.github/.github/workflows/zizmor.yml` from 1.6.0 to 1.7.0
- [Release notes](https://github.com/crazy-max/.github/releases)
- [Commits](https://github.com/crazy-max/.github/compare/d89fe92d808a15e2b2ed5cdb62db7c172c31410d...4a17dbaa9ce13920fc5bb8824eb89c16301e5ab2)

---
updated-dependencies:
- dependency-name: crazy-max/.github/.github/workflows/pr-assign-author.yml
  dependency-version: 1.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: crazy-max-dot-github
- dependency-name: crazy-max/.github/.github/workflows/zizmor.yml
  dependency-version: 1.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: crazy-max-dot-github
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-22 23:42:21 +00:00
dependabot[bot] 5f986360d4 chore(deps): Bump actions/setup-node from 6.3.0 to 6.4.0
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6.3.0 to 6.4.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/53b83947a5a98c8d113130e565377fae1a50d02f...48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 6.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-21 00:30:11 +00:00
CrazyMax b108b61c0d Merge pull request #426 from docker/dependabot/github_actions/github/codeql-action-4.35.2
chore(deps): Bump github/codeql-action from 4.35.1 to 4.35.2
2026-04-20 16:04:12 +02:00
dependabot[bot] 1dce13c20b chore(deps): Bump github/codeql-action from 4.35.1 to 4.35.2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.35.1 to 4.35.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/c10b8064de6f491fea524254123dbe5e09572f13...95e58e9a2cdfd71adc6e0353d5c52f41a045d225)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.35.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-17 23:43:48 +00:00
Tõnis Tiigi f1008e7fe9 Merge pull request #424 from crazy-max/fix-zizmor
ci(zizmor): update rules
2026-04-15 14:24:58 -07:00
CrazyMax 457218658f Merge pull request #420 from crazy-max/vars-input
add vars input for bake variables
2026-04-15 18:57:05 +02:00
CrazyMax 48b09cfbb5 ci(zizmor): update rules
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-04-15 15:01:07 +02:00
CrazyMax 54045cd868 Merge pull request #421 from docker/dependabot/github_actions/actions/github-script-9.0.0
chore(deps): Bump actions/github-script from 8.0.0 to 9.0.0
2026-04-15 14:42:15 +02:00
CrazyMax 9139c9d2e4 Merge pull request #422 from docker/dependabot/github_actions/actions/create-github-app-token-3.1.1
chore(deps): Bump actions/create-github-app-token from 3.0.0 to 3.1.1
2026-04-15 14:42:00 +02:00
CrazyMax c6ab6838f0 Merge pull request #423 from docker/dependabot/github_actions/docker/bake-action-7.1.0
chore(deps): Bump docker/bake-action from 7.0.0 to 7.1.0
2026-04-15 14:41:40 +02:00
dependabot[bot] 51cd27d3d5 chore(deps): Bump docker/bake-action from 7.0.0 to 7.1.0
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 7.0.0 to 7.1.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/82490499d2e5613fcead7e128237ef0b0ea210f7...a66e1c87e2eca0503c343edf1d208c716d54b8a8)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-version: 7.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-13 23:43:19 +00:00
dependabot[bot] 699dabf187 chore(deps): Bump actions/create-github-app-token from 3.0.0 to 3.1.1
Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 3.0.0 to 3.1.1.
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](https://github.com/actions/create-github-app-token/compare/f8d387b68d61c58ab83c6c016672934102569859...1b10c78c7865c340bc4f6099eb2f838309f1e8c3)

---
updated-dependencies:
- dependency-name: actions/create-github-app-token
  dependency-version: 3.1.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-13 23:43:06 +00:00
dependabot[bot] 4bda63984e chore(deps): Bump actions/github-script from 8.0.0 to 9.0.0
Bumps [actions/github-script](https://github.com/actions/github-script) from 8.0.0 to 9.0.0.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/ed597411d8f924073f98dfc5c65a23a2325f34cd...3a2844b7e9c422d3c10d287c895573f7108da1b3)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: 9.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-13 23:43:03 +00:00
CrazyMax 9521d2372d chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-04-13 10:19:40 +02:00
CrazyMax 9e2d1f1956 add vars input for bake variables
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-04-13 10:19:18 +02:00
CrazyMax a66e1c87e2 Merge pull request #417 from docker/dependabot/npm_and_yarn/vite-7.3.2
chore(deps): Bump vite from 7.3.1 to 7.3.2
2026-04-09 19:49:12 +02:00
CrazyMax 316cfbbb0c Merge pull request #419 from docker/dependabot/npm_and_yarn/lodash-4.18.1
chore(deps): Bump lodash from 4.17.23 to 4.18.1
2026-04-09 19:48:54 +02:00
github-actions[bot] 1e84aebe91 chore: update generated content 2026-04-09 17:44:25 +00:00
dependabot[bot] 69478a6181 chore(deps): Bump lodash from 4.17.23 to 4.18.1
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.23 to 4.18.1.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.23...4.18.1)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.18.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-09 17:43:18 +00:00
CrazyMax 9c521920c0 Merge pull request #416 from crazy-max/refactor-git-context
refactor: use new gitContext for bake source resolution
2026-04-09 19:38:15 +02:00
CrazyMax b48ae068f7 Merge pull request #418 from docker/dependabot/github_actions/crazy-max-dot-github-f0991e81fd
chore(deps): Bump the crazy-max-dot-github group with 2 updates
2026-04-09 10:16:01 +02:00
dependabot[bot] 07be208056 chore(deps): Bump the crazy-max-dot-github group with 2 updates
Bumps the crazy-max-dot-github group with 2 updates: [crazy-max/.github/.github/workflows/pr-assign-author.yml](https://github.com/crazy-max/.github) and [crazy-max/.github/.github/workflows/zizmor.yml](https://github.com/crazy-max/.github).


Updates `crazy-max/.github/.github/workflows/pr-assign-author.yml` from 1.3.0 to 1.6.0
- [Release notes](https://github.com/crazy-max/.github/releases)
- [Commits](https://github.com/crazy-max/.github/compare/bb328ea508cd6a89d0865555ddbeb148e5724aed...d89fe92d808a15e2b2ed5cdb62db7c172c31410d)

Updates `crazy-max/.github/.github/workflows/zizmor.yml` from 1.3.0 to 1.6.0
- [Release notes](https://github.com/crazy-max/.github/releases)
- [Commits](https://github.com/crazy-max/.github/compare/bb328ea508cd6a89d0865555ddbeb148e5724aed...d89fe92d808a15e2b2ed5cdb62db7c172c31410d)

---
updated-dependencies:
- dependency-name: crazy-max/.github/.github/workflows/pr-assign-author.yml
  dependency-version: 1.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: crazy-max-dot-github
- dependency-name: crazy-max/.github/.github/workflows/zizmor.yml
  dependency-version: 1.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: crazy-max-dot-github
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-08 23:42:24 +00:00
CrazyMax b3f5862c07 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-04-08 12:54:30 +02:00
CrazyMax 561e713afb refactor: use new gitContext for bake source resolution
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-04-08 12:51:34 +02:00
CrazyMax cc339485f5 bump @docker/actions-toolkit from 0.79.0 to 0.87.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-04-08 12:51:33 +02:00
dependabot[bot] 06f662d146 chore(deps): Bump vite from 7.3.1 to 7.3.2
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 7.3.1 to 7.3.2.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v7.3.2/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.3.2/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 7.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-06 23:10:41 +00:00
CrazyMax 573e9342f7 Merge pull request #410 from docker/dependabot/npm_and_yarn/handlebars-4.7.9
chore(deps): Bump handlebars from 4.7.8 to 4.7.9
2026-04-01 12:24:25 +02:00
github-actions[bot] 0237695a63 chore: update generated content 2026-04-01 10:19:51 +00:00
dependabot[bot] 0b1d05e37c chore(deps): Bump handlebars from 4.7.8 to 4.7.9
Bumps [handlebars](https://github.com/handlebars-lang/handlebars.js) from 4.7.8 to 4.7.9.
- [Release notes](https://github.com/handlebars-lang/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/v4.7.9/release-notes.md)
- [Commits](https://github.com/handlebars-lang/handlebars.js/compare/v4.7.8...v4.7.9)

---
updated-dependencies:
- dependency-name: handlebars
  dependency-version: 4.7.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-01 10:18:38 +00:00
Paweł Gronowski 9ee317add1 Merge pull request #415 from crazy-max/fix-update-dist
ci: stop update-dist reruns after generated dist pushes
2026-04-01 12:09:57 +02:00
CrazyMax 66d42d5fe2 ci: stop update-dist reruns after generated dist pushes
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-31 17:26:42 +02:00
CrazyMax 5872f2d2b5 Merge pull request #407 from docker/dependabot/npm_and_yarn/picomatch-4.0.4
chore(deps): Bump picomatch from 4.0.3 to 4.0.4
2026-03-31 16:59:59 +02:00
CrazyMax 01bcd5c5c3 Merge pull request #411 from docker/dependabot/npm_and_yarn/brace-expansion-1.1.13
chore(deps): Bump brace-expansion from 1.1.12 to 1.1.13
2026-03-31 16:59:21 +02:00
CrazyMax 6c79f1f6ec Merge pull request #414 from docker/dependabot/github_actions/codecov/codecov-action-6.0.0
chore(deps): Bump codecov/codecov-action from 5.5.4 to 6.0.0
2026-03-31 09:32:14 +02:00
dependabot[bot] 4c1645a81a chore(deps): Bump codecov/codecov-action from 5.5.4 to 6.0.0
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.5.4 to 6.0.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/75cd11691c0faa626561e295848008c8a7dddffe...57e3a136b779b570ffcdbf80b3bdc90e7fab3de2)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-31 01:50:20 +00:00
Tõnis Tiigi 9e7a27e46b Merge pull request #413 from crazy-max/zizmor
ci: zizmor workflow
2026-03-30 18:49:05 -07:00
CrazyMax 9c8c59b36d fix zizmor findings
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-30 13:41:01 +02:00
CrazyMax f055ae898b ci: zizmor workflow
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-30 11:29:35 +02:00
github-actions[bot] faa3991157 chore: update generated content 2026-03-27 16:13:12 +00:00
dependabot[bot] 60e55bc65d chore(deps): Bump brace-expansion from 1.1.12 to 1.1.13
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.12 to 1.1.13.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/v1.1.12...v1.1.13)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.13
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-27 16:11:56 +00:00
dependabot[bot] 0cf016cd20 chore(deps): Bump picomatch from 4.0.3 to 4.0.4
Bumps [picomatch](https://github.com/micromatch/picomatch) from 4.0.3 to 4.0.4.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/4.0.3...4.0.4)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 4.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-26 06:26:42 +00:00
Tõnis Tiigi 2f8d900d05 Merge pull request #406 from crazy-max/update-crazy-max-actions
ci: bump crazy-max/.github to 1.1.0
2026-03-25 10:42:45 -07:00
CrazyMax d24af26b64 ci: bump crazy-max/.github to 1.1.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-25 12:19:33 +01:00
CrazyMax 50bd4b2564 Merge pull request #395 from docker/dependabot/npm_and_yarn/undici-6.24.0
chore(deps): Bump undici from 6.23.0 to 6.24.1
2026-03-24 13:55:38 +01:00
github-actions[bot] 933f827d94 chore: update generated content 2026-03-24 12:51:23 +00:00
dependabot[bot] 04486f6562 chore(deps): Bump undici from 6.23.0 to 6.24.0
Bumps [undici](https://github.com/nodejs/undici) from 6.23.0 to 6.24.0.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v6.23.0...v6.24.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 6.24.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-24 12:50:03 +00:00
CrazyMax 99343ed6d3 Merge pull request #400 from docker/dependabot/npm_and_yarn/fast-xml-parser-5.5.6
chore(deps): Bump fast-xml-parser from 5.4.2 to 5.5.9
2026-03-24 13:48:13 +01:00
github-actions[bot] 2bdd544224 chore: update generated content 2026-03-24 12:41:35 +00:00
dependabot[bot] bbc5ee32a4 chore(deps): Bump fast-xml-parser from 5.4.2 to 5.5.6
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 5.4.2 to 5.5.6.
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5.4.2...v5.5.6)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-version: 5.5.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-24 12:40:23 +00:00
CrazyMax 6f063f5a2c Merge pull request #401 from docker/dependabot/npm_and_yarn/glob-10.5.0
chore(deps): Bump glob from 10.3.12 to 10.5.0
2026-03-24 13:38:17 +01:00
CrazyMax 5663537ea2 Merge pull request #403 from docker/dependabot/npm_and_yarn/flatted-3.4.2
chore(deps): Bump flatted from 3.3.3 to 3.4.2
2026-03-24 13:37:20 +01:00
dependabot[bot] 46894079a4 chore(deps): Bump flatted from 3.3.3 to 3.4.2
Bumps [flatted](https://github.com/WebReflection/flatted) from 3.3.3 to 3.4.2.
- [Commits](https://github.com/WebReflection/flatted/compare/v3.3.3...v3.4.2)

---
updated-dependencies:
- dependency-name: flatted
  dependency-version: 3.4.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-20 16:01:44 +00:00
CrazyMax e83250164d Merge pull request #402 from crazy-max/codeql
ci: enable SAST scanning with CodeQL
2026-03-20 17:00:12 +01:00
CrazyMax 40614d05b3 ci: enable SAST scanning with CodeQL
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-20 11:46:40 +01:00
github-actions[bot] 53dc7d5b2e chore: update generated content 2026-03-20 01:07:33 +00:00
dependabot[bot] 65461e5da4 chore(deps): Bump glob from 10.3.12 to 10.5.0
Bumps [glob](https://github.com/isaacs/node-glob) from 10.3.12 to 10.5.0.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v10.3.12...v10.5.0)

---
updated-dependencies:
- dependency-name: glob
  dependency-version: 10.5.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-20 01:05:07 +00:00
CrazyMax cb7799a153 Merge pull request #397 from docker/dependabot/github_actions/actions/create-github-app-token-3
chore(deps): Bump actions/create-github-app-token from 2 to 3
2026-03-17 09:35:05 +01:00
CrazyMax ed9fc89995 Merge pull request #398 from socheatsok78/update-action-github-script
Upgrade github-script action from v7 to v8
2026-03-17 09:34:49 +01:00
Socheat 4c6643337d Upgrade github-script action from v7 to v8
Signed-off-by: Socheat <github@socheat.dev>
2026-03-17 11:35:20 +07:00
dependabot[bot] f0fcce2f20 chore(deps): Bump actions/create-github-app-token from 2 to 3
Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 2 to 3.
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](https://github.com/actions/create-github-app-token/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/create-github-app-token
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-16 23:42:16 +00:00
CrazyMax f26ee67c8b Merge pull request #393 from docker/dependabot/github_actions/docker/setup-buildx-action-4
chore(deps): Bump docker/setup-buildx-action from 3 to 4
2026-03-06 09:44:30 +01:00
CrazyMax c1370d6be4 Merge pull request #392 from docker/dependabot/github_actions/docker/metadata-action-6
chore(deps): Bump docker/metadata-action from 5 to 6
2026-03-06 09:41:08 +01:00
CrazyMax 4380696821 Merge pull request #391 from docker/dependabot/github_actions/docker/bake-action-7
chore(deps): Bump docker/bake-action from 6 to 7
2026-03-06 09:40:51 +01:00
dependabot[bot] d5f0a11b02 chore(deps): Bump docker/setup-buildx-action from 3 to 4
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3 to 4.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-05 23:42:20 +00:00
dependabot[bot] 80718bd717 chore(deps): Bump docker/metadata-action from 5 to 6
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5 to 6.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-05 23:42:17 +00:00
dependabot[bot] a2c53a0d11 chore(deps): Bump docker/bake-action from 6 to 7
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 6 to 7.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v6...v7)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-05 23:42:12 +00:00
CrazyMax cbe08afc1d Merge pull request #390 from crazy-max/update-readme
readme: update to v7
2026-03-05 20:39:48 +01:00
CrazyMax a8f89f27f2 readme: update to v7
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-05 19:52:40 +01:00
CrazyMax 82490499d2 Merge pull request #365 from crazy-max/context-input
merge workdir into source input
2026-03-05 19:12:00 +01:00
CrazyMax 7017b891b1 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-05 17:06:08 +01:00
CrazyMax 8e8fbbb910 merge workdir into source input
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-05 17:01:37 +01:00
CrazyMax 471133c110 Merge pull request #386 from crazy-max/rm-deprecated-envs
remove deprecated envs
2026-03-05 17:00:14 +01:00
CrazyMax f4a2547f80 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-05 09:16:07 +01:00
CrazyMax 04d8281a0b remove deprecated envs
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-05 09:14:03 +01:00
CrazyMax 8fdd4fbcfa Merge pull request #388 from docker/dependabot/github_actions/docker/setup-qemu-action-4
chore(deps): Bump docker/setup-qemu-action from 3 to 4
2026-03-05 08:32:10 +01:00
CrazyMax 549b4276f9 Merge pull request #389 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.79.0
chore(deps): Bump @docker/actions-toolkit from 0.78.0 to 0.79.0
2026-03-05 08:31:52 +01:00
github-actions[bot] a22e8b4359 chore: update generated content 2026-03-05 01:51:08 +00:00
dependabot[bot] 325dda5cc1 chore(deps): Bump @docker/actions-toolkit from 0.78.0 to 0.79.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.78.0 to 0.79.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.78.0...v0.79.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-version: 0.79.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-05 01:49:54 +00:00
Tõnis Tiigi 124afc9b2a Merge pull request #370 from crazy-max/remove-list-targets
remove list-targets subaction
2026-03-04 17:48:06 -08:00
Tõnis Tiigi 9716e42fa0 Merge pull request #387 from crazy-max/rm-legacy-export
remove legacy export-build tool support
2026-03-04 17:47:29 -08:00
Tõnis Tiigi df378f37f1 Merge pull request #383 from crazy-max/node24
node 24 as default runtime
2026-03-04 17:47:04 -08:00
dependabot[bot] a47bdde0c3 chore(deps): Bump docker/setup-qemu-action from 3 to 4
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3 to 4.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-04 23:42:22 +00:00
CrazyMax f04bdcca6b chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-04 14:45:59 +01:00
CrazyMax 80669dec4d remove legacy export-build tool support
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-04 14:44:19 +01:00
CrazyMax 7363f027e4 node 24 as default runtime
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-04 11:46:53 +01:00
CrazyMax 4cde8b2bc2 Merge pull request #384 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.78.0
chore(deps): Bump @docker/actions-toolkit from 0.77.0 to 0.78.0
2026-03-04 11:44:31 +01:00
github-actions[bot] f178d1d921 chore: update generated content 2026-03-04 10:35:11 +00:00
dependabot[bot] d7926aae53 chore(deps): Bump @docker/actions-toolkit from 0.77.0 to 0.78.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.77.0 to 0.78.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.77.0...v0.78.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-version: 0.78.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-04 10:33:53 +00:00
Tõnis Tiigi 1e43cd9ec1 Merge pull request #381 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.77.0
chore(deps): Bump @docker/actions-toolkit from 0.68.0 to 0.77.0
2026-03-03 11:10:01 -08:00
CrazyMax 6495c30be7 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-03 17:53:17 +01:00
CrazyMax cc3dc856a7 test: stabilize context test fixtures and github mock setup since ESM
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-03 17:53:17 +01:00
CrazyMax 261e2f7ede github summary and artifact logic moved since actions-toolkit v0.77.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-03 16:39:22 +01:00
dependabot[bot] 49c12c7536 chore(deps): Bump @docker/actions-toolkit from 0.68.0 to 0.77.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.68.0 to 0.77.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.68.0...v0.77.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-version: 0.77.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-03 15:32:59 +00:00
CrazyMax add429de5b Merge pull request #382 from docker/dependabot/npm_and_yarn/actions/core-3.0.0
chore(deps): Bump @actions/core from 1.11.1 to 3.0.0
2026-03-03 16:30:48 +01:00
github-actions[bot] eeb3544b47 chore: update generated content 2026-03-03 15:28:06 +00:00
dependabot[bot] e0aed8e67c chore(deps): Bump @actions/core from 1.11.1 to 3.0.0
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.11.1 to 3.0.0.
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-03 15:26:42 +00:00
CrazyMax 7366777695 Merge pull request #379 from docker/dependabot/npm_and_yarn/isaacs/brace-expansion-5.0.1
chore(deps): Bump @isaacs/brace-expansion from 5.0.0 to 5.0.1
2026-03-03 16:23:38 +01:00
github-actions[bot] a2cea6dea6 chore: update generated content 2026-03-03 15:22:07 +00:00
dependabot[bot] c77b5b2a1b chore(deps): Bump @isaacs/brace-expansion from 5.0.0 to 5.0.1
Bumps @isaacs/brace-expansion from 5.0.0 to 5.0.1.

---
updated-dependencies:
- dependency-name: "@isaacs/brace-expansion"
  dependency-version: 5.0.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-03 15:20:45 +00:00
CrazyMax bd4dc5e5a8 Merge pull request #376 from docker/dependabot/npm_and_yarn/lodash-4.17.23
chore(deps): Bump lodash from 4.17.21 to 4.17.23
2026-03-03 16:19:35 +01:00
CrazyMax 836d9ebf26 Merge pull request #380 from crazy-max/esm
switch to ESM and update config/test wiring
2026-03-03 16:15:23 +01:00
CrazyMax 919640e006 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-02 09:37:26 +01:00
CrazyMax 14c7b57f99 dockerfile: fix vendoring
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-02 09:37:25 +01:00
CrazyMax 7c5fb1ba46 update dev dependencies
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-01 10:57:56 +01:00
CrazyMax 8fb85661a4 switch to ESM and update config/test wiring
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-01 10:57:13 +01:00
CrazyMax 0108d7fd26 switch from jest to vitest
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-01 10:49:21 +01:00
CrazyMax 1cf124c0da Merge pull request #377 from crazy-max/update-dist-workflow
ci: update-dist workflow
2026-01-29 20:33:38 +01:00
CrazyMax 244d63bb6d ci: update-dist workflow
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-01-29 16:17:53 +01:00
dependabot[bot] 6b5467d611 chore(deps): Bump lodash from 4.17.21 to 4.17.23
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-22 00:42:13 +00:00
Tõnis Tiigi 75c00e7961 Merge pull request #372 from crazy-max/update-dev-deps
update dev dependencies
2026-01-07 16:41:56 -08:00
CrazyMax bf4ef44586 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-01-07 16:32:46 +01:00
CrazyMax a35ee0c096 update jest config since 30.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-01-07 16:30:28 +01:00
CrazyMax c9a0e8e297 migrate eslint config to new format required since 9.0.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-01-07 16:30:28 +01:00
CrazyMax ed0758f217 update dev dependencies
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-01-07 16:30:28 +01:00
CrazyMax 7540d5c95e remove list-targets subaction
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-12-19 10:36:21 +01:00
CrazyMax 5be5f02ff8 Merge pull request #360 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.68.0
chore(deps): Bump @docker/actions-toolkit from 0.63.0 to 0.68.0
2025-11-27 12:30:41 +01:00
CrazyMax 4f25520e7a chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-11-27 12:13:33 +01:00
dependabot[bot] eeacb3deff chore(deps): Bump @docker/actions-toolkit from 0.63.0 to 0.68.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.63.0 to 0.68.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.63.0...v0.68.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-version: 0.68.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-27 10:31:45 +00:00
CrazyMax cce027f633 Merge pull request #358 from docker/dependabot/github_actions/actions/checkout-6
chore(deps): Bump actions/checkout from 5 to 6
2025-11-27 09:56:13 +01:00
CrazyMax 53ce91f18b Merge pull request #357 from docker/dependabot/npm_and_yarn/js-yaml-3.14.2
chore(deps): Bump js-yaml from 3.14.1 to 3.14.2
2025-11-27 09:56:02 +01:00
dependabot[bot] 6b8437d2b5 chore(deps): Bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-27 08:54:22 +00:00
CrazyMax d14785b0cb Merge pull request #359 from crazy-max/check-attest-definition
check provenance attestation set in bake definition before overriding
2025-11-27 09:53:25 +01:00
CrazyMax 597dc07998 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-11-26 12:30:19 +01:00
CrazyMax 8ba51ac4ee check provenance attestation set in bake definition before overriding
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-11-26 12:30:19 +01:00
dependabot[bot] 23c049fba9 chore(deps): Bump js-yaml from 3.14.1 to 3.14.2
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.14.1 to 3.14.2.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.14.1...3.14.2)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 3.14.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 20:01:35 +00:00
CrazyMax 41c10f2beb Merge pull request #350 from docker/dependabot/github_actions/actions/github-script-8
chore(deps): Bump actions/github-script from 7 to 8
2025-09-13 13:12:26 +02:00
dependabot[bot] 5b9bf92d49 chore(deps): Bump actions/github-script from 7 to 8
Bumps [actions/github-script](https://github.com/actions/github-script) from 7 to 8.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-04 23:01:25 +00:00
CrazyMax 3acf805d94 Merge pull request #345 from crazy-max/update-yarn
update yarn to 4.9.2
2025-08-20 17:02:25 +02:00
CrazyMax f6376ff6a4 update yarn to 4.9.2
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-08-20 16:56:24 +02:00
CrazyMax 60b3af61bc Merge pull request #344 from crazy-max/update-dev
update dev dependencies
2025-08-20 16:54:19 +02:00
CrazyMax f08ef55f78 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-08-20 16:51:55 +02:00
CrazyMax c22b3482ed update dev dependencies
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-08-20 16:51:03 +02:00
CrazyMax 40bffc195e Merge pull request #342 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.63.0
chore(deps): Bump @docker/actions-toolkit from 0.62.1 to 0.63.0
2025-08-20 16:49:03 +02:00
CrazyMax d7a0b5eb51 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-08-20 16:46:24 +02:00
dependabot[bot] 3965f4baf4 chore(deps): Bump @docker/actions-toolkit from 0.62.1 to 0.63.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.62.1 to 0.63.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.62.1...v0.63.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-version: 0.63.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-20 14:43:32 +00:00
CrazyMax 3d864c34f9 Merge pull request #341 from docker/dependabot/npm_and_yarn/tmp-0.2.4
chore(deps): Bump tmp from 0.2.3 to 0.2.4
2025-08-20 16:41:23 +02:00
CrazyMax 3589b0c183 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-08-20 16:39:06 +02:00
dependabot[bot] 2215fae6ab chore(deps): Bump tmp from 0.2.3 to 0.2.4
Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.3 to 0.2.4.
- [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/raszi/node-tmp/compare/v0.2.3...v0.2.4)

---
updated-dependencies:
- dependency-name: tmp
  dependency-version: 0.2.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-20 14:37:49 +00:00
CrazyMax d0cb9774dc Merge pull request #340 from docker/dependabot/npm_and_yarn/undici-5.29.0
chore(deps): Bump undici from 5.28.4 to 5.29.0
2025-08-20 16:35:21 +02:00
CrazyMax a6c0a91e79 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-08-20 16:31:47 +02:00
dependabot[bot] 74cb41d332 chore(deps): Bump undici from 5.28.4 to 5.29.0
Bumps [undici](https://github.com/nodejs/undici) from 5.28.4 to 5.29.0.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.4...v5.29.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 5.29.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-20 14:29:38 +00:00
CrazyMax 8f035c08cd Merge pull request #339 from docker/dependabot/npm_and_yarn/brace-expansion-1.1.12
chore(deps): Bump brace-expansion from 1.1.11 to 1.1.12
2025-08-20 16:27:16 +02:00
CrazyMax a4c28defc8 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-08-20 16:25:20 +02:00
dependabot[bot] d260a27f75 chore(deps): Bump brace-expansion from 1.1.11 to 1.1.12
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.11 to 1.1.12.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/1.1.11...v1.1.12)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.12
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-20 14:23:25 +00:00
CrazyMax 5efdf4de8d Merge pull request #338 from crazy-max/call-input
call input to set method for evaluating build
2025-08-20 16:19:54 +02:00
Tõnis Tiigi 1a42865db7 Merge pull request #204 from crazy-max/subaction-matrix
matrix subaction
2025-08-20 12:39:21 +03:00
CrazyMax ba406cd72e subaction: check expected output
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-08-14 10:14:36 +02:00
CrazyMax 1d0c0ffa52 list-targets: deprecation notice
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-08-14 10:14:36 +02:00
CrazyMax 68cf998b48 matrix subaction
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-08-14 10:14:36 +02:00
CrazyMax 7a78e75fa4 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-08-14 09:50:47 +02:00
CrazyMax 24d8c3471c call input to set method for evaluating build
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-08-14 09:48:36 +02:00
CrazyMax 6de75d5ad2 Merge pull request #343 from docker/dependabot/github_actions/actions/checkout-5
chore(deps): Bump actions/checkout from 4 to 5
2025-08-14 09:41:42 +02:00
dependabot[bot] 72003b9fac chore(deps): Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 09:45:44 +00:00
CrazyMax a1257e6518 Merge pull request #334 from docker/dependabot/npm_and_yarn/form-data-2.5.5
chore(deps): Bump form-data from 2.5.1 to 2.5.5
2025-08-05 15:17:20 +02:00
CrazyMax 846dea0f3a Merge pull request #335 from meator/patch-1
README.md: fix link
2025-07-25 12:25:38 +02:00
meator 1367d98caa README.md: fix link
The old link pointed to a section which no longer exists.

Signed-off-by: meator <meator.dev@gmail.com>
2025-07-23 17:33:43 +02:00
dependabot[bot] 88f3e5553b chore(deps): Bump form-data from 2.5.1 to 2.5.5
Bumps [form-data](https://github.com/form-data/form-data) from 2.5.1 to 2.5.5.
- [Release notes](https://github.com/form-data/form-data/releases)
- [Changelog](https://github.com/form-data/form-data/blob/v2.5.5/CHANGELOG.md)
- [Commits](https://github.com/form-data/form-data/compare/v2.5.1...v2.5.5)

---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 2.5.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-21 23:22:07 +00:00
CrazyMax d576212e5b Merge pull request #332 from crazy-max/subaction-list-targets-enhanced
list-targets: use toolkit to sanitize inputs
2025-07-04 17:11:25 +02:00
CrazyMax d4a3c3cc87 list-targets: use toolkit to sanitize inputs
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-07-04 16:40:51 +02:00
48 changed files with 10554 additions and 9367 deletions
-3
View File
@@ -1,3 +0,0 @@
/dist/**
/coverage/**
/node_modules/**
-24
View File
@@ -1,24 +0,0 @@
{
"env": {
"node": true,
"es6": true,
"jest": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"jest",
"prettier"
]
}
+13 -1
View File
@@ -1,9 +1,17 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
directories:
- "/"
- "/subaction/matrix"
schedule:
interval: "daily"
cooldown:
default-days: 2
groups:
crazy-max-dot-github:
patterns:
- "crazy-max/.github/*"
labels:
- "dependencies"
- "bot"
@@ -11,6 +19,10 @@ updates:
directory: "/"
schedule:
interval: "daily"
cooldown:
default-days: 2
exclude:
- "@docker/actions-toolkit"
versioning-strategy: "increase"
allow:
- dependency-type: "production"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

+50 -60
View File
@@ -1,5 +1,8 @@
name: ci-subaction
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
@@ -25,75 +28,62 @@ on:
- 'test/**'
jobs:
list-targets-group:
matrix:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
-
testdir: group
expected: >
[{"target":"t1"},{"target":"t2"}]
-
testdir: group-matrix
target: validate
expected: >
[{"target":"lint-default"},{"target":"lint-labs"},{"target":"lint-nydus"},{"target":"lint-proto"},{"target":"lint-yaml"},{"target":"validate-doctoc"},{"target":"validate-vendor"}]
-
testdir: group-with-platform
target: validate
expected: >
[{"target":"lint"},{"target":"lint-gopls"},{"target":"validate-docs"},{"target":"validate-vendor"}]
-
testdir: group-with-platform
target: validate
fields: platforms
expected: >
[{"target":"lint","platforms":"darwin/amd64"},{"target":"lint","platforms":"darwin/arm64"},{"target":"lint","platforms":"linux/amd64"},{"target":"lint","platforms":"linux/arm64"},{"target":"lint","platforms":"linux/s390x"},{"target":"lint","platforms":"linux/ppc64le"},{"target":"lint","platforms":"linux/riscv64"},{"target":"lint","platforms":"windows/amd64"},{"target":"lint","platforms":"windows/arm64"},{"target":"lint-gopls","platforms":"darwin/amd64"},{"target":"lint-gopls","platforms":"darwin/arm64"},{"target":"lint-gopls","platforms":"linux/amd64"},{"target":"lint-gopls","platforms":"linux/arm64"},{"target":"lint-gopls","platforms":"linux/s390x"},{"target":"lint-gopls","platforms":"linux/ppc64le"},{"target":"lint-gopls","platforms":"linux/riscv64"},{"target":"lint-gopls","platforms":"windows/amd64"},{"target":"lint-gopls","platforms":"windows/arm64"},{"target":"validate-docs"},{"target":"validate-vendor"}]
-
testdir: group-with-platform
target: validate
fields: platforms,dockerfile
expected: >
[{"target":"lint","dockerfile":"./hack/dockerfiles/lint.Dockerfile"},{"target":"lint","dockerfile":"./hack/dockerfiles/lint.Dockerfile","platforms":"darwin/amd64"},{"target":"lint","dockerfile":"./hack/dockerfiles/lint.Dockerfile","platforms":"darwin/arm64"},{"target":"lint","dockerfile":"./hack/dockerfiles/lint.Dockerfile","platforms":"linux/amd64"},{"target":"lint","dockerfile":"./hack/dockerfiles/lint.Dockerfile","platforms":"linux/arm64"},{"target":"lint","dockerfile":"./hack/dockerfiles/lint.Dockerfile","platforms":"linux/s390x"},{"target":"lint","dockerfile":"./hack/dockerfiles/lint.Dockerfile","platforms":"linux/ppc64le"},{"target":"lint","dockerfile":"./hack/dockerfiles/lint.Dockerfile","platforms":"linux/riscv64"},{"target":"lint","dockerfile":"./hack/dockerfiles/lint.Dockerfile","platforms":"windows/amd64"},{"target":"lint","dockerfile":"./hack/dockerfiles/lint.Dockerfile","platforms":"windows/arm64"},{"target":"lint-gopls","dockerfile":"./hack/dockerfiles/lint.Dockerfile"},{"target":"lint-gopls","dockerfile":"./hack/dockerfiles/lint.Dockerfile","platforms":"darwin/amd64"},{"target":"lint-gopls","dockerfile":"./hack/dockerfiles/lint.Dockerfile","platforms":"darwin/arm64"},{"target":"lint-gopls","dockerfile":"./hack/dockerfiles/lint.Dockerfile","platforms":"linux/amd64"},{"target":"lint-gopls","dockerfile":"./hack/dockerfiles/lint.Dockerfile","platforms":"linux/arm64"},{"target":"lint-gopls","dockerfile":"./hack/dockerfiles/lint.Dockerfile","platforms":"linux/s390x"},{"target":"lint-gopls","dockerfile":"./hack/dockerfiles/lint.Dockerfile","platforms":"linux/ppc64le"},{"target":"lint-gopls","dockerfile":"./hack/dockerfiles/lint.Dockerfile","platforms":"linux/riscv64"},{"target":"lint-gopls","dockerfile":"./hack/dockerfiles/lint.Dockerfile","platforms":"windows/amd64"},{"target":"lint-gopls","dockerfile":"./hack/dockerfiles/lint.Dockerfile","platforms":"windows/arm64"},{"target":"validate-docs","dockerfile":"./hack/dockerfiles/docs.Dockerfile"},{"target":"validate-vendor","dockerfile":"./hack/dockerfiles/vendor.Dockerfile"}]
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Matrix gen
id: gen
uses: ./subaction/list-targets
uses: ./subaction/matrix
with:
workdir: ./test/group
workdir: ./test/${{ matrix.testdir }}
target: ${{ matrix.target }}
fields: ${{ matrix.fields }}
-
name: Check targets
uses: actions/github-script@v7
name: Check output
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
INPUT_MATRIX: ${{ steps.gen.outputs.matrix }}
INPUT_EXPECTED: ${{ matrix.expected }}
with:
script: |
const targets = `${{ steps.gen.outputs.targets }}`;
if (!targets) {
core.setFailed('No targets generated');
const matrix = JSON.stringify(JSON.parse(core.getInput('matrix')));
const expected = JSON.stringify(JSON.parse(core.getInput('expected')));
if (matrix !== expected) {
throw new Error(`Matrix do not match expected values: ${matrix} != ${expected}`);
} else {
core.info(`✅`);
}
core.info(`targets=${targets}`);
list-targets-group-matrix:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Matrix gen
id: gen
uses: ./subaction/list-targets
with:
workdir: ./test/group-matrix
target: validate
-
name: Check targets
uses: actions/github-script@v7
with:
script: |
const targets = `${{ steps.gen.outputs.targets }}`;
if (!targets) {
core.setFailed('No targets generated');
}
core.info(`targets=${targets}`);
list-targets-multi-files:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Matrix gen
id: gen
uses: ./subaction/list-targets
with:
workdir: ./test/multi-files
files: |
docker-bake.json
docker-bake.hcl
-
name: Check targets
uses: actions/github-script@v7
with:
script: |
const targets = `${{ steps.gen.outputs.targets }}`;
if (!targets) {
core.setFailed('No targets generated');
}
core.info(`targets=${targets}`);
+243 -122
View File
@@ -1,5 +1,8 @@
name: ci
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
@@ -46,20 +49,20 @@ jobs:
- release
services:
registry:
image: registry:2
image: registry:2.8.3@sha256:a3d8aaa63ed8681a604f1dea0aa03f100d5895b6a58ace528858a7b332415373
ports:
- 5000:5000
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
@@ -82,7 +85,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Build
continue-on-error: true
@@ -99,7 +102,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Stop docker
run: |
@@ -116,7 +119,27 @@ jobs:
-
name: Check
run: |
echo "${{ toJson(steps.bake) }}"
if [ "${{ steps.bake.outcome }}" != "failure" ] || [ "${{ steps.bake.conclusion }}" != "success" ]; then
echo "::error::Should have failed"
exit 1
fi
error-source:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Build
id: bake
continue-on-error: true
uses: ./
with:
source: ./does-not-exist
-
name: Check
run: |
if [ "${{ steps.bake.outcome }}" != "failure" ] || [ "${{ steps.bake.conclusion }}" != "success" ]; then
echo "::error::Should have failed"
exit 1
@@ -127,7 +150,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Uninstall docker cli
run: |
@@ -138,7 +161,7 @@ jobs:
fi
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
@@ -156,7 +179,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Build
uses: ./
@@ -178,10 +201,10 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
@@ -191,8 +214,7 @@ jobs:
name: Build
uses: ./
with:
workdir: ./test/go
source: .
source: ./test/go
targets: binary
provenance: ${{ matrix.attrs }}
set: |
@@ -214,16 +236,16 @@ jobs:
output: /tmp/bake-build
services:
registry:
image: registry:2
image: registry:2.8.3@sha256:a3d8aaa63ed8681a604f1dea0aa03f100d5895b6a58ace528858a7b332415373
ports:
- 5000:5000
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
@@ -233,8 +255,7 @@ jobs:
name: Build
uses: ./
with:
workdir: ./test/go
source: .
source: ./test/go
targets: ${{ matrix.target }}
sbom: true
set: |
@@ -269,19 +290,18 @@ jobs:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
image: registry:2.8.3@sha256:a3d8aaa63ed8681a604f1dea0aa03f100d5895b6a58ace528858a7b332415373
ports:
- 5000:5000
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Build
uses: ./
with:
workdir: ./test/go
source: .
source: ./test/go
set: |
*.platform=linux/amd64
*.output=type=image,"name=localhost:5000/name/app:v1.0.0,localhost:5000/name/app:latest",push=true
@@ -291,16 +311,16 @@ jobs:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
image: registry:2.8.3@sha256:a3d8aaa63ed8681a604f1dea0aa03f100d5895b6a58ace528858a7b332415373
ports:
- 5000:5000
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
@@ -310,8 +330,7 @@ jobs:
name: Build and push
uses: ./
with:
workdir: ./test/group
source: .
source: ./test/group
push: true
set: |
t1.tags=localhost:5000/name/app:t1
@@ -322,7 +341,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set malformed docker config
run: |
@@ -340,7 +359,7 @@ jobs:
runs-on: ubuntu-latest
services:
squid-proxy:
image: ubuntu/squid:latest
image: ubuntu/squid:latest@sha256:6a097f68bae708cedbabd6188d68c7e2e7a38cedd05a176e1cc0ba29e3bbe029
ports:
- 3128:3128
steps:
@@ -351,7 +370,7 @@ jobs:
curl --retry 5 --retry-all-errors --retry-delay 0 --connect-timeout 5 --proxy http://127.0.0.1:3128 -v --insecure --head https://www.google.com
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set proxy config
run: |
@@ -359,7 +378,7 @@ jobs:
echo '{"proxies":{"default":{"httpProxy":"http://127.0.0.1:3128","httpsProxy":"http://127.0.0.1:3128"}}}' > ~/.docker/config.json
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
@@ -379,7 +398,7 @@ jobs:
runs-on: ubuntu-latest
services:
squid-proxy:
image: ubuntu/squid:latest
image: ubuntu/squid:latest@sha256:6a097f68bae708cedbabd6188d68c7e2e7a38cedd05a176e1cc0ba29e3bbe029
ports:
- 3128:3128
steps:
@@ -390,10 +409,10 @@ jobs:
curl --retry 5 --retry-all-errors --retry-delay 0 --connect-timeout 5 --proxy http://127.0.0.1:3128 -v --insecure --head https://www.google.com
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
@@ -415,10 +434,10 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
@@ -426,16 +445,41 @@ jobs:
-
name: Build
uses: ./
with:
files: |
./test/config.hcl
git-context-query:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: v0.33.0
driver-opts: |
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build
uses: ./
with:
files: |
./test/config.hcl
env:
BUILDX_SEND_GIT_QUERY_AS_INPUT: true
git-context-and-local:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
@@ -443,28 +487,29 @@ jobs:
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6.1.0
-
name: Build
uses: ./
with:
files: |
./test/config.hcl
cwd://${{ steps.meta.outputs.bake-file }}
multi-output:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
image: registry:2.8.3@sha256:a3d8aaa63ed8681a604f1dea0aa03f100d5895b6a58ace528858a7b332415373
ports:
- 5000:5000
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
@@ -473,8 +518,7 @@ jobs:
name: Build and push
uses: ./
with:
workdir: ./test/go
source: .
source: ./test/go
set: |
*.output=type=image,name=localhost:5000/name/app:latest,push=true
*.output=type=docker,name=app:local
@@ -499,16 +543,16 @@ jobs:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
image: registry:2.8.3@sha256:a3d8aaa63ed8681a604f1dea0aa03f100d5895b6a58ace528858a7b332415373
ports:
- 5000:5000
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
@@ -517,8 +561,7 @@ jobs:
name: Build and push
uses: ./
with:
workdir: ./test/go
source: .
source: ./test/go
targets: image
load: true
push: true
@@ -538,10 +581,10 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
@@ -556,39 +599,15 @@ jobs:
env:
DOCKER_BUILD_SUMMARY: false
summary-disable-deprecated:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build
uses: ./
with:
source: .
files: |
./test/config.hcl
targets: app
env:
DOCKER_BUILD_NO_SUMMARY: true
summary-not-supported:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: v0.12.1
driver-opts: |
@@ -606,10 +625,10 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
@@ -635,10 +654,10 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
@@ -653,35 +672,6 @@ jobs:
env:
DOCKER_BUILD_RECORD_RETENTION_DAYS: ${{ matrix.days }}
export-legacy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
legacy:
- false
- true
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build
uses: ./
with:
files: |
./test/config.hcl
targets: app
env:
DOCKER_BUILD_EXPORT_LEGACY: ${{ matrix.legacy }}
checks:
runs-on: ubuntu-latest
strategy:
@@ -693,10 +683,10 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: ${{ matrix.buildx-version }}
driver-opts: |
@@ -705,8 +695,7 @@ jobs:
name: Build
uses: ./
with:
workdir: ./test
source: .
source: ./test
files: |
./lint.hcl
@@ -715,10 +704,10 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
@@ -727,8 +716,7 @@ jobs:
name: Build
uses: ./
with:
workdir: ./test
source: .
source: ./test
files: |
./lint.hcl
env:
@@ -747,10 +735,10 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: ${{ matrix.buildx-version }}
driver-opts: |
@@ -769,7 +757,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Build
uses: ./
@@ -779,3 +767,136 @@ jobs:
./test/config.hcl
env:
BUILDX_NO_DEFAULT_ATTESTATIONS: 1
call-check:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build
id: bake
continue-on-error: true
uses: ./
with:
source: ./test
files: |
./lint.hcl
call: check
targets: lint
-
name: Check
run: |
if [ "${{ steps.bake.outcome }}" != "failure" ] || [ "${{ steps.bake.conclusion }}" != "success" ]; then
echo "::error::Should have failed"
exit 1
fi
call-check-multi:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build
id: bake
continue-on-error: true
uses: ./
with:
source: ./test
files: |
./lint.hcl
call: check
-
name: Check
run: |
if [ "${{ steps.bake.outcome }}" != "failure" ] || [ "${{ steps.bake.conclusion }}" != "success" ]; then
echo "::error::Should have failed"
exit 1
fi
call-check-nowarning:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build
id: bake
continue-on-error: true
uses: ./
with:
source: .
files: |
./test/config.hcl
call: check
attest-override:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build and push
uses: ./
with:
source: ./test/attest
var:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build
uses: ./
with:
source: ./test/go
targets: binary
vars: |
DESTDIR=/tmp/build
-
name: Check output folder
working-directory: /tmp/build
run: |
tree .
+46
View File
@@ -0,0 +1,46 @@
name: codeql
permissions:
contents: read
on:
push:
branches:
- 'master'
- 'releases/v*'
pull_request:
env:
NODE_VERSION: "24"
jobs:
analyze:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
-
name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Enable corepack
run: |
corepack enable
yarn --version
-
name: Set up Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ env.NODE_VERSION }}
-
name: Initialize CodeQL
uses: github/codeql-action/init@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
with:
languages: javascript-typescript
build-mode: none
-
name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
with:
category: "/language:javascript-typescript"
+2 -2
View File
@@ -4,14 +4,14 @@ permissions:
contents: read
on:
pull_request_target:
pull_request_target: # zizmor: ignore[dangerous-triggers] safe to use without checkout
types:
- opened
- reopened
jobs:
run:
uses: crazy-max/.github/.github/workflows/pr-assign-author.yml@1b673f36fad86812f538c1df9794904038a23cbf
uses: crazy-max/.github/.github/workflows/pr-assign-author.yml@9ba6e6f9450baf3b1237f8035c1fdc45932510bd # v1.8.0
permissions:
contents: read
pull-requests: write
+9 -2
View File
@@ -1,5 +1,12 @@
name: publish
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
release:
types:
@@ -15,7 +22,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Publish
uses: actions/publish-immutable-action@v0.0.4
uses: actions/publish-immutable-action@4bc8754ffc40f27910afb20287dbbbb675a4e978 # v0.0.4
+6 -3
View File
@@ -1,5 +1,8 @@
name: test
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
@@ -23,16 +26,16 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: Test
uses: docker/bake-action@v6
uses: docker/bake-action@6614cfa25eff9a0b2b2697efb0b6159e7680d584 # v7.2.0
with:
source: .
targets: test
-
name: Upload coverage
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
with:
files: ./coverage/clover.xml
token: ${{ secrets.CODECOV_TOKEN }}
+58
View File
@@ -0,0 +1,58 @@
name: update-dist
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
types:
- opened
- synchronize
jobs:
update-dist:
if: github.actor == 'dependabot[bot]' && github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == github.event.pull_request.head.repo.full_name
runs-on: ubuntu-latest
steps:
-
name: GitHub auth token from GitHub App
id: docker-read-app
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
app-id: ${{ secrets.GHACTIONS_REPO_WRITE_APP_ID }}
private-key: ${{ secrets.GHACTIONS_REPO_WRITE_APP_PRIVATE_KEY }}
owner: docker
repositories: bake-action
permission-contents: write
-
name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
token: ${{ steps.docker-read-app.outputs.token }}
-
name: Build
uses: docker/bake-action@6614cfa25eff9a0b2b2697efb0b6159e7680d584 # v7.2.0
with:
source: .
targets: build
-
name: Commit and push dist
run: |
if [ -n "$(git status --porcelain -- dist)" ]; then
(
set -x
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add dist
git commit -m "chore: update generated content"
git push
)
else
echo "No changes in dist"
fi
+8 -5
View File
@@ -1,5 +1,8 @@
name: validate
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
@@ -15,15 +18,15 @@ jobs:
prepare:
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.generate.outputs.targets }}
matrix: ${{ steps.generate.outputs.matrix }}
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
-
name: List targets
id: generate
uses: ./subaction/list-targets
uses: ./subaction/matrix
with:
target: validate
@@ -34,10 +37,10 @@ jobs:
strategy:
fail-fast: false
matrix:
target: ${{ fromJson(needs.prepare.outputs.targets) }}
include: ${{ fromJson(needs.prepare.outputs.matrix) }}
steps:
-
name: Validate
uses: docker/bake-action@v6
uses: docker/bake-action@6614cfa25eff9a0b2b2697efb0b6159e7680d584 # v7.2.0
with:
targets: ${{ matrix.target }}
+29
View File
@@ -0,0 +1,29 @@
name: zizmor
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
push:
branches:
- 'master'
- 'releases/v*'
tags:
- 'v*'
pull_request:
jobs:
zizmor:
uses: crazy-max/.github/.github/workflows/zizmor.yml@9ba6e6f9450baf3b1237f8035c1fdc45932510bd # v1.8.0
permissions:
contents: read
security-events: write
with:
min-severity: medium
min-confidence: medium
persona: pedantic
+1 -2
View File
@@ -6,6 +6,5 @@
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false,
"arrowParens": "avoid",
"parser": "typescript"
"arrowParens": "avoid"
}
File diff suppressed because one or more lines are too long
+13 -5
View File
@@ -1,13 +1,21 @@
# https://yarnpkg.com/configuration/yarnrc
nodeLinker: node-modules
logFilters:
- code: YN0004
level: discard
- code: YN0013
level: discard
- code: YN0019
level: discard
- code: YN0076
level: discard
- code: YN0086
level: discard
nodeLinker: node-modules
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
compressionLevel: mixed
enableGlobalCache: false
enableHardenedMode: true
enableScripts: false
npmMinimalAgeGate: 2d
+72 -28
View File
@@ -22,7 +22,9 @@ ___
* [outputs](#outputs)
* [environment variables](#environment-variables)
* [Subactions](#subactions)
* [`list-targets`](subaction/list-targets)
* [`matrix`](subaction/matrix)
* [Notes](#notes)
* [Source semantics](#source-semantics)
* [Contributing](#contributing)
## Usage
@@ -50,16 +52,16 @@ jobs:
steps:
-
name: Login to DockerHub
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
-
name: Build and push
uses: docker/bake-action@v6
uses: docker/bake-action@v7
with:
push: true
set: |
@@ -80,7 +82,7 @@ to the default Git context:
```yaml
-
name: Build and push
uses: docker/bake-action@v6
uses: docker/bake-action@v7
with:
source: "{{defaultContext}}:mysubdir"
push: true
@@ -100,7 +102,7 @@ another private repository for remote definitions, you can set the
```yaml
-
name: Build and push
uses: docker/bake-action@v6
uses: docker/bake-action@v7
with:
push: true
set: |
@@ -123,19 +125,19 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
-
name: Login to DockerHub
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
-
name: Build and push
uses: docker/bake-action@v6
uses: docker/bake-action@v7
with:
source: .
push: true
@@ -143,6 +145,31 @@ jobs:
*.tags=user/app:latest
```
If you point `source` to a subdirectory, relative paths are resolved from that
subdirectory:
```yaml
-
name: Build and push
uses: docker/bake-action@v7
with:
source: ./subdir
files: ./docker-bake.hcl
```
For example, if `./subdir/docker-bake.hcl` contains:
```hcl
target "default" {
output = ["type=local,dest=./artifacts"]
}
```
The output will be written to `./subdir/artifacts` in the workspace.
> [!NOTE]
> More info about `source` semantics in the [Source semantics](#source-semantics) section.
## Summaries
This action generates a [job summary](https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/)
@@ -197,22 +224,23 @@ The following inputs can be used as `step.with` keys
> targets: default,release
> ```
| Name | Type | Description |
|----------------|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `builder` | String | Builder instance (see [setup-buildx](https://github.com/docker/setup-buildx-action) action) |
| `source` | String | Context to build from. Can be either local (`.`) or a [remote bake definition](https://docs.docker.com/build/customize/bake/file-definition/#remote-definition) |
| `allow` | List/CSV | Allow build to access specified resources (e.g., `network.host`) |
| `files` | List/CSV | List of [bake definition files](https://docs.docker.com/build/customize/bake/file-definition/) |
| `workdir` | String | Working directory of execution |
| `targets` | List/CSV | List of bake targets (`default` target used if empty) |
| `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`) |
| `provenance` | Bool/String | [Provenance](https://docs.docker.com/build/attestations/slsa-provenance/) is a shorthand for `--set=*.attest=type=provenance` |
| `push` | Bool | Push is a shorthand for `--set=*.output=type=registry` (default `false`) |
| `sbom` | Bool/String | [SBOM](https://docs.docker.com/build/attestations/sbom/) is a shorthand for `--set=*.attest=type=sbom` |
| `set` | List | List of [targets values to override](https://docs.docker.com/engine/reference/commandline/buildx_bake/#set) (e.g., `targetpattern.key=value`) |
| `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 }}`) |
| Name | Type | Description |
|----------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `builder` | String | Builder instance (see [setup-buildx](https://github.com/docker/setup-buildx-action) action) |
| `allow` | List/CSV | Allow build to access specified resources (e.g., `network.host`) |
| `call` | String | Set method for evaluating build (e.g., check) |
| `files` | List/CSV | List of [bake definition files](https://docs.docker.com/build/customize/bake/file-definition/) |
| `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`) |
| `provenance` | Bool/String | [Provenance](https://docs.docker.com/build/attestations/slsa-provenance/) is a shorthand for `--set=*.attest=type=provenance` |
| `push` | Bool | Push is a shorthand for `--set=*.output=type=registry` (default `false`) |
| `sbom` | Bool/String | [SBOM](https://docs.docker.com/build/attestations/sbom/) is a shorthand for `--set=*.attest=type=sbom` |
| `set` | List | List of [targets values to override](https://docs.docker.com/engine/reference/commandline/buildx_bake/#set) (e.g., `targetpattern.key=value`) |
| `source` | String | Build source to use. Supports local path and [remote bake definition](https://docs.docker.com/build/bake/remote-definition/). With a local path, Bake runs from that directory, so all relative paths are resolved from it. See [Source semantics](#source-semantics). |
| `targets` | List/CSV | List of bake targets (`default` target used if empty) |
| `vars` | List | [Variables](https://docs.docker.com/build/bake/variables/) to set in the Bake definition as list of key-value pair |
| `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 }}`) |
### outputs
@@ -230,11 +258,27 @@ The following outputs are available
| `DOCKER_BUILD_SUMMARY` | Bool | `true` | If `false`, [build summary](https://docs.docker.com/build/ci/github-actions/build-summary/) generation is disabled |
| `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 |
| `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` |
| `DOCKER_BUILD_EXPORT_LEGACY` | Bool | `false` | If `true`, exports build using legacy export-build tool instead of [`buildx history export` command](https://docs.docker.com/reference/cli/docker/buildx/history/export/) |
## Subactions
* [`list-targets`](subaction/list-targets)
* [`matrix`](subaction/matrix)
## Notes
### Source semantics
`source` accepts either a Git/remote bake definition (for example `{{defaultContext}}` or `{{defaultContext}}:subdir`)
or a local path (for example `.` or `./subdir`). When `source` is a local path,
the action runs Bake from that directory (equivalent to `cd <path> && docker buildx bake`).
This local path mode affects all relative paths resolved by Bake, not only
target `context` fields. This includes paths used by local outputs, cache
import/export, and `cwd://` references.
| `source` | Behavior |
|-----------------------------------------------------------------------|------------------------------------------------------------------------------------------------|
| Git/remote (`{{defaultContext}}`, `https://...git#ref`, `...:subdir`) | Uses [remote bake definition](https://docs.docker.com/build/bake/remote-definition/) behavior. |
| Local path (`.`, `./subdir`) | Changes Bake working directory to that path before invoking Bake. |
## Contributing
-207
View File
@@ -1,207 +0,0 @@
import {jest} from '@jest/globals';
export const context = {
repo: {
owner: 'docker',
repo: 'build-push-action'
},
ref: 'refs/heads/master',
runId: 123456789,
payload: {
after: '860c1904a1ce19322e91ac35af1ab07466440c37',
base_ref: null,
before: '5f3331d7f7044c18ca9f12c77d961c4d7cf3276a',
commits: [
{
author: {
email: 'crazy-max@users.noreply.github.com',
name: 'CrazyMax',
username: 'crazy-max'
},
committer: {
email: 'crazy-max@users.noreply.github.com',
name: 'CrazyMax',
username: 'crazy-max'
},
distinct: true,
id: '860c1904a1ce19322e91ac35af1ab07466440c37',
message: 'hello dev',
timestamp: '2022-04-19T11:27:24+02:00',
tree_id: 'd2c60af597e863787d2d27f569e30495b0b92820',
url: 'https://github.com/docker/test-docker-action/commit/860c1904a1ce19322e91ac35af1ab07466440c37'
}
],
compare: 'https://github.com/docker/test-docker-action/compare/5f3331d7f704...860c1904a1ce',
created: false,
deleted: false,
forced: false,
head_commit: {
author: {
email: 'crazy-max@users.noreply.github.com',
name: 'CrazyMax',
username: 'crazy-max'
},
committer: {
email: 'crazy-max@users.noreply.github.com',
name: 'CrazyMax',
username: 'crazy-max'
},
distinct: true,
id: '860c1904a1ce19322e91ac35af1ab07466440c37',
message: 'hello dev',
timestamp: '2022-04-19T11:27:24+02:00',
tree_id: 'd2c60af597e863787d2d27f569e30495b0b92820',
url: 'https://github.com/docker/test-docker-action/commit/860c1904a1ce19322e91ac35af1ab07466440c37'
},
organization: {
avatar_url: 'https://avatars.githubusercontent.com/u/5429470?v=4',
description: 'Docker helps developers bring their ideas to life by conquering the complexity of app development.',
events_url: 'https://api.github.com/orgs/docker/events',
hooks_url: 'https://api.github.com/orgs/docker/hooks',
id: 5429470,
issues_url: 'https://api.github.com/orgs/docker/issues',
login: 'docker',
members_url: 'https://api.github.com/orgs/docker/members{/member}',
node_id: 'MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=',
public_members_url: 'https://api.github.com/orgs/docker/public_members{/member}',
repos_url: 'https://api.github.com/orgs/docker/repos',
url: 'https://api.github.com/orgs/docker'
},
pusher: {
email: 'github@crazymax.dev',
name: 'crazy-max'
},
ref: 'refs/heads/dev',
repository: {
allow_forking: true,
archive_url: 'https://api.github.com/repos/docker/test-docker-action/{archive_format}{/ref}',
archived: false,
assignees_url: 'https://api.github.com/repos/docker/test-docker-action/assignees{/user}',
blobs_url: 'https://api.github.com/repos/docker/test-docker-action/git/blobs{/sha}',
branches_url: 'https://api.github.com/repos/docker/test-docker-action/branches{/branch}',
clone_url: 'https://github.com/docker/test-docker-action.git',
collaborators_url: 'https://api.github.com/repos/docker/test-docker-action/collaborators{/collaborator}',
comments_url: 'https://api.github.com/repos/docker/test-docker-action/comments{/number}',
commits_url: 'https://api.github.com/repos/docker/test-docker-action/commits{/sha}',
compare_url: 'https://api.github.com/repos/docker/test-docker-action/compare/{base}...{head}',
contents_url: 'https://api.github.com/repos/docker/test-docker-action/contents/{+path}',
contributors_url: 'https://api.github.com/repos/docker/test-docker-action/contributors',
created_at: 1596792180,
default_branch: 'master',
deployments_url: 'https://api.github.com/repos/docker/test-docker-action/deployments',
description: 'Test "Docker" Actions',
disabled: false,
downloads_url: 'https://api.github.com/repos/docker/test-docker-action/downloads',
events_url: 'https://api.github.com/repos/docker/test-docker-action/events',
fork: false,
forks: 1,
forks_count: 1,
forks_url: 'https://api.github.com/repos/docker/test-docker-action/forks',
full_name: 'docker/test-docker-action',
git_commits_url: 'https://api.github.com/repos/docker/test-docker-action/git/commits{/sha}',
git_refs_url: 'https://api.github.com/repos/docker/test-docker-action/git/refs{/sha}',
git_tags_url: 'https://api.github.com/repos/docker/test-docker-action/git/tags{/sha}',
git_url: 'git://github.com/docker/test-docker-action.git',
has_downloads: true,
has_issues: true,
has_pages: false,
has_projects: true,
has_wiki: true,
homepage: '',
hooks_url: 'https://api.github.com/repos/docker/test-docker-action/hooks',
html_url: 'https://github.com/docker/test-docker-action',
id: 285789493,
is_template: false,
issue_comment_url: 'https://api.github.com/repos/docker/test-docker-action/issues/comments{/number}',
issue_events_url: 'https://api.github.com/repos/docker/test-docker-action/issues/events{/number}',
issues_url: 'https://api.github.com/repos/docker/test-docker-action/issues{/number}',
keys_url: 'https://api.github.com/repos/docker/test-docker-action/keys{/key_id}',
labels_url: 'https://api.github.com/repos/docker/test-docker-action/labels{/name}',
language: 'JavaScript',
languages_url: 'https://api.github.com/repos/docker/test-docker-action/languages',
license: {
key: 'mit',
name: 'MIT License',
node_id: 'MDc6TGljZW5zZTEz',
spdx_id: 'MIT',
url: 'https://api.github.com/licenses/mit'
},
master_branch: 'master',
merges_url: 'https://api.github.com/repos/docker/test-docker-action/merges',
milestones_url: 'https://api.github.com/repos/docker/test-docker-action/milestones{/number}',
mirror_url: null,
name: 'test-docker-action',
node_id: 'MDEwOlJlcG9zaXRvcnkyODU3ODk0OTM=',
notifications_url: 'https://api.github.com/repos/docker/test-docker-action/notifications{?since,all,participating}',
open_issues: 6,
open_issues_count: 6,
organization: 'docker',
owner: {
avatar_url: 'https://avatars.githubusercontent.com/u/5429470?v=4',
email: 'info@docker.com',
events_url: 'https://api.github.com/users/docker/events{/privacy}',
followers_url: 'https://api.github.com/users/docker/followers',
following_url: 'https://api.github.com/users/docker/following{/other_user}',
gists_url: 'https://api.github.com/users/docker/gists{/gist_id}',
gravatar_id: '',
html_url: 'https://github.com/docker',
id: 5429470,
login: 'docker',
name: 'docker',
node_id: 'MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=',
organizations_url: 'https://api.github.com/users/docker/orgs',
received_events_url: 'https://api.github.com/users/docker/received_events',
repos_url: 'https://api.github.com/users/docker/repos',
site_admin: false,
starred_url: 'https://api.github.com/users/docker/starred{/owner}{/repo}',
subscriptions_url: 'https://api.github.com/users/docker/subscriptions',
type: 'Organization',
url: 'https://api.github.com/users/docker'
},
private: true,
pulls_url: 'https://api.github.com/repos/docker/test-docker-action/pulls{/number}',
pushed_at: 1650360446,
releases_url: 'https://api.github.com/repos/docker/test-docker-action/releases{/id}',
size: 796,
ssh_url: 'git@github.com:docker/test-docker-action.git',
stargazers: 0,
stargazers_count: 0,
stargazers_url: 'https://api.github.com/repos/docker/test-docker-action/stargazers',
statuses_url: 'https://api.github.com/repos/docker/test-docker-action/statuses/{sha}',
subscribers_url: 'https://api.github.com/repos/docker/test-docker-action/subscribers',
subscription_url: 'https://api.github.com/repos/docker/test-docker-action/subscription',
svn_url: 'https://github.com/docker/test-docker-action',
tags_url: 'https://api.github.com/repos/docker/test-docker-action/tags',
teams_url: 'https://api.github.com/repos/docker/test-docker-action/teams',
topics: [],
trees_url: 'https://api.github.com/repos/docker/test-docker-action/git/trees{/sha}',
updated_at: '2022-04-19T09:05:09Z',
url: 'https://github.com/docker/test-docker-action',
visibility: 'private',
watchers: 0,
watchers_count: 0
},
sender: {
avatar_url: 'https://avatars.githubusercontent.com/u/1951866?v=4',
events_url: 'https://api.github.com/users/crazy-max/events{/privacy}',
followers_url: 'https://api.github.com/users/crazy-max/followers',
following_url: 'https://api.github.com/users/crazy-max/following{/other_user}',
gists_url: 'https://api.github.com/users/crazy-max/gists{/gist_id}',
gravatar_id: '',
html_url: 'https://github.com/crazy-max',
id: 1951866,
login: 'crazy-max',
node_id: 'MDQ6VXNlcjE5NTE4NjY=',
organizations_url: 'https://api.github.com/users/crazy-max/orgs',
received_events_url: 'https://api.github.com/users/crazy-max/received_events',
repos_url: 'https://api.github.com/users/crazy-max/repos',
site_admin: false,
starred_url: 'https://api.github.com/users/crazy-max/starred{/owner}{/repo}',
subscriptions_url: 'https://api.github.com/users/crazy-max/subscriptions',
type: 'User',
url: 'https://api.github.com/users/crazy-max'
}
}
};
export const getOctokit = jest.fn();
+144 -116
View File
@@ -1,124 +1,92 @@
import {afterEach, beforeEach, describe, expect, jest, test} from '@jest/globals';
import {afterEach, beforeEach, describe, expect, test, vi} from 'vitest';
import * as fs from 'fs';
import * as os from 'os';
import * as path from 'path';
import {Bake} from '@docker/actions-toolkit/lib/buildx/bake';
import {Builder} from '@docker/actions-toolkit/lib/buildx/builder';
import {Buildx} from '@docker/actions-toolkit/lib/buildx/buildx';
import {Context} from '@docker/actions-toolkit/lib/context';
import {Docker} from '@docker/actions-toolkit/lib/docker/docker';
import {GitHub} from '@docker/actions-toolkit/lib/github';
import {Toolkit} from '@docker/actions-toolkit/lib/toolkit';
import {Bake} from '@docker/actions-toolkit/lib/buildx/bake.js';
import {Build} from '@docker/actions-toolkit/lib/buildx/build.js';
import {Builder} from '@docker/actions-toolkit/lib/buildx/builder.js';
import {Buildx} from '@docker/actions-toolkit/lib/buildx/buildx.js';
import {Docker} from '@docker/actions-toolkit/lib/docker/docker.js';
import {Toolkit} from '@docker/actions-toolkit/lib/toolkit.js';
import {BakeDefinition} from '@docker/actions-toolkit/lib/types/buildx/bake';
import {BuilderInfo} from '@docker/actions-toolkit/lib/types/buildx/builder';
import {GitHubRepo} from '@docker/actions-toolkit/lib/types/github';
import {BakeDefinition} from '@docker/actions-toolkit/lib/types/buildx/bake.js';
import {BuilderInfo} from '@docker/actions-toolkit/lib/types/buildx/builder.js';
import * as context from '../src/context';
import * as context from '../src/context.js';
const tmpDir = path.join('/tmp', '.docker-bake-action-jest');
const tmpName = path.join(tmpDir, '.tmpname-jest');
const tmpDir = fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'context-'));
const fixturesDir = path.join(__dirname, 'fixtures');
import repoFixture from './fixtures/github-repo.json';
jest.spyOn(GitHub.prototype, 'repoData').mockImplementation((): Promise<GitHubRepo> => {
return <Promise<GitHubRepo>>(repoFixture as unknown);
});
jest.spyOn(Context, 'tmpDir').mockImplementation((): string => {
if (!fs.existsSync(tmpDir)) {
fs.mkdirSync(tmpDir, {recursive: true});
}
return tmpDir;
});
jest.spyOn(Context, 'tmpName').mockImplementation((): string => {
return tmpName;
});
jest.spyOn(Docker, 'isAvailable').mockImplementation(async (): Promise<boolean> => {
vi.spyOn(Docker, 'isAvailable').mockImplementation(async (): Promise<boolean> => {
return true;
});
const metadataJson = path.join(tmpDir, 'metadata.json');
jest.spyOn(Bake.prototype, 'getMetadataFilePath').mockImplementation((): string => {
vi.spyOn(Bake.prototype, 'getMetadataFilePath').mockImplementation((): string => {
return metadataJson;
});
jest.spyOn(Builder.prototype, 'inspect').mockImplementation(async (): Promise<BuilderInfo> => {
type BuilderInfoFixture = Omit<BuilderInfo, 'lastActivity'> & {lastActivity: string};
const builderInfoFixture = <BuilderInfoFixture>JSON.parse(fs.readFileSync(path.join(fixturesDir, 'builder-info.json'), {encoding: 'utf-8'}).trim());
vi.spyOn(Builder.prototype, 'inspect').mockImplementation(async (): Promise<BuilderInfo> => {
return {
name: 'builder2',
driver: 'docker-container',
lastActivity: new Date('2023-01-16 09:45:23 +0000 UTC'),
nodes: [
{
buildkit: 'v0.11.0',
'buildkitd-flags': '--debug --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host',
'driver-opts': ['BUILDKIT_STEP_LOG_MAX_SIZE=10485760', 'BUILDKIT_STEP_LOG_MAX_SPEED=10485760', 'JAEGER_TRACE=localhost:6831', 'image=moby/buildkit:latest', 'network=host'],
endpoint: 'unix:///var/run/docker.sock',
name: 'builder20',
platforms: 'linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6',
status: 'running'
}
]
...builderInfoFixture,
lastActivity: new Date(builderInfoFixture.lastActivity)
};
});
jest.spyOn(Bake.prototype, 'getDefinition').mockImplementation(async (): Promise<BakeDefinition> => {
return JSON.parse(`{
"group": {
"default": {
"targets": [
"validate"
]
},
"validate": {
"targets": [
"lint",
"validate-vendor",
"validate-docs"
]
vi.spyOn(Bake.prototype, 'getDefinition').mockImplementation(async (): Promise<BakeDefinition> => {
return <BakeDefinition>JSON.parse(fs.readFileSync(path.join(fixturesDir, 'bake-def.json'), {encoding: 'utf-8'}).trim());
});
describe('getInputs', () => {
const originalEnv = process.env;
beforeEach(() => {
process.env = Object.keys(process.env).reduce((object, key) => {
if (!key.startsWith('INPUT_')) {
object[key] = process.env[key];
}
},
"target": {
"lint": {
"context": ".",
"dockerfile": "./hack/dockerfiles/lint.Dockerfile",
"args": {
"BUILDKIT_CONTEXT_KEEP_GIT_DIR": "1",
"GO_VERSION": "1.20"
},
"output": [
"type=cacheonly"
]
},
"validate-docs": {
"context": ".",
"dockerfile": "./hack/dockerfiles/docs.Dockerfile",
"args": {
"BUILDKIT_CONTEXT_KEEP_GIT_DIR": "1",
"BUILDX_EXPERIMENTAL": "1",
"FORMATS": "md",
"GO_VERSION": "1.20"
},
"target": "validate",
"output": [
"type=cacheonly"
]
},
"validate-vendor": {
"context": ".",
"dockerfile": "./hack/dockerfiles/vendor.Dockerfile",
"args": {
"BUILDKIT_CONTEXT_KEEP_GIT_DIR": "1",
"GO_VERSION": "1.20"
},
"target": "validate",
"output": [
"type=cacheonly"
]
}
}
}`) as BakeDefinition;
return object;
}, {});
});
afterEach(() => {
process.env = originalEnv;
});
function setRequiredBooleanInputs(): void {
setInput('no-cache', 'false');
setInput('pull', 'false');
setInput('load', 'false');
setInput('push', 'false');
}
test('uses Build git context when source input is empty', async () => {
const gitContext = 'https://github.com/docker/bake-action.git?ref=refs/heads/master&checksum=0123456789abcdef';
const gitContextSpy = vi.spyOn(Build.prototype, 'gitContext').mockResolvedValue(gitContext);
setRequiredBooleanInputs();
const inputs = await context.getInputs();
expect(inputs.source).toEqual({
remoteRef: gitContext
});
expect(gitContextSpy).toHaveBeenCalledTimes(1);
gitContextSpy.mockRestore();
});
test('renders defaultContext source templates from Build git context', async () => {
const gitContext = 'https://github.com/docker/bake-action.git#refs/heads/master';
const gitContextSpy = vi.spyOn(Build.prototype, 'gitContext').mockResolvedValue(gitContext);
setRequiredBooleanInputs();
setInput('source', '{{defaultContext}}:subdir');
const inputs = await context.getInputs();
expect(inputs.source).toEqual({
remoteRef: `${gitContext}:subdir`
});
expect(gitContextSpy).toHaveBeenCalledTimes(1);
gitContextSpy.mockRestore();
});
});
describe('getArgs', () => {
@@ -218,7 +186,9 @@ describe('getArgs', () => {
[
'bake',
'--metadata-file', metadataJson,
"--provenance", `mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`,
'--set', `lint.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`,
'--set', `validate-docs.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`,
'--set', `validate-vendor.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`,
],
undefined
],
@@ -236,7 +206,7 @@ describe('getArgs', () => {
[
'bake',
'--metadata-file', metadataJson,
"--provenance", `builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`
"--provenance", `builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`
],
undefined
],
@@ -254,7 +224,7 @@ describe('getArgs', () => {
[
'bake',
'--metadata-file', metadataJson,
"--provenance", `mode=max,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`
"--provenance", `mode=max,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`
],
undefined
],
@@ -311,7 +281,9 @@ describe('getArgs', () => {
'--set', '*.platform=linux/amd64,linux/ppc64le,linux/s390x',
'--set', `*.output=type=image,"name=moby/buildkit:v0.11.0,moby/buildkit:latest",push=true`,
'--metadata-file', metadataJson,
'--provenance', `mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`,
'--set', `lint.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`,
'--set', `validate-docs.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`,
'--set', `validate-vendor.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`,
'image-all'
],
undefined
@@ -332,7 +304,9 @@ describe('getArgs', () => {
'bake',
'--set', `*.labels.foo=bar=#baz`,
'--metadata-file', metadataJson,
'--provenance', `mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`,
'--set', `lint.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`,
'--set', `validate-docs.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`,
'--set', `validate-vendor.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`,
'image-all'
],
undefined
@@ -349,10 +323,12 @@ describe('getArgs', () => {
]),
[
'bake',
'https://github.com/docker/build-push-action.git#refs/heads/master',
'https://github.com/docker/bake-action.git#refs/heads/master',
'--file', './foo.hcl',
'--metadata-file', metadataJson,
'--provenance', `mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`,
'--set', `lint.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`,
'--set', `validate-docs.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`,
'--set', `validate-vendor.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`
],
undefined
],
@@ -371,7 +347,9 @@ describe('getArgs', () => {
'bake',
'--allow', 'network.host',
'--metadata-file', metadataJson,
"--provenance", `mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`
'--set', `lint.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`,
'--set', `validate-docs.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`,
'--set', `validate-vendor.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`
],
undefined
],
@@ -388,10 +366,12 @@ describe('getArgs', () => {
]),
[
'bake',
'https://github.com/docker/build-push-action.git#refs/heads/master:subdir',
'https://github.com/docker/bake-action.git#refs/heads/master:subdir',
'--file', './foo.hcl',
'--metadata-file', metadataJson,
'--provenance', `mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`,
'--set', `lint.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`,
'--set', `validate-docs.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`,
'--set', `validate-vendor.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`
],
undefined
],
@@ -413,8 +393,56 @@ describe('getArgs', () => {
['BUILDX_NO_DEFAULT_ATTESTATIONS', '1']
])
],
[
15,
'0.29.0',
new Map<string, string>([
['load', 'false'],
['no-cache', 'false'],
['push', 'false'],
['pull', 'false'],
['files', './foo.hcl'],
]),
[
'bake',
'https://github.com/docker/bake-action.git?ref=refs/heads/master',
'--allow', 'fs=*',
'--file', './foo.hcl',
'--metadata-file', metadataJson,
'--set', `lint.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`,
'--set', `validate-docs.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`,
'--set', `validate-vendor.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`
],
new Map<string, string>([
['BUILDX_SEND_GIT_QUERY_AS_INPUT', 'true']
])
],
[
16,
'0.28.0',
new Map<string, string>([
['load', 'false'],
['no-cache', 'false'],
['push', 'false'],
['pull', 'false'],
['files', './foo.hcl'],
]),
[
'bake',
'https://github.com/docker/bake-action.git#refs/heads/master',
'--allow', 'fs=*',
'--file', './foo.hcl',
'--metadata-file', metadataJson,
'--set', `lint.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`,
'--set', `validate-docs.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`,
'--set', `validate-vendor.attest=type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/bake-action/actions/runs/123456789/attempts/1`
],
new Map<string, string>([
['BUILDX_SEND_GIT_QUERY_AS_INPUT', 'true']
])
],
])(
'[%d] given %p with %p as inputs, returns %p',
'[%d] given %o with %o as inputs, returns %o',
async (num: number, buildxVersion: string, inputs: Map<string, string>, expected: Array<string>, envs: Map<string, string> | undefined) => {
if (envs) {
envs.forEach((value: string, name: string) => {
@@ -425,7 +453,7 @@ describe('getArgs', () => {
setInput(name, value);
});
const toolkit = new Toolkit();
jest.spyOn(Buildx.prototype, 'version').mockImplementation(async (): Promise<string> => {
vi.spyOn(Buildx.prototype, 'version').mockImplementation(async (): Promise<string> => {
return buildxVersion;
});
const inp = await context.getInputs();
@@ -438,11 +466,11 @@ describe('getArgs', () => {
provenance: inp.provenance,
push: inp.push,
sbom: inp.sbom,
source: inp.source,
source: inp.source.remoteRef,
targets: inp.targets
},
{
cwd: inp.workdir
cwd: inp.source.workdir,
}
);
const res = await context.getArgs(inp, definition, toolkit);
+55
View File
@@ -0,0 +1,55 @@
{
"group": {
"default": {
"targets": [
"validate"
]
},
"validate": {
"targets": [
"lint",
"validate-vendor",
"validate-docs"
]
}
},
"target": {
"lint": {
"context": ".",
"dockerfile": "./hack/dockerfiles/lint.Dockerfile",
"args": {
"BUILDKIT_CONTEXT_KEEP_GIT_DIR": "1",
"GO_VERSION": "1.20"
},
"output": [
"type=cacheonly"
]
},
"validate-docs": {
"context": ".",
"dockerfile": "./hack/dockerfiles/docs.Dockerfile",
"args": {
"BUILDKIT_CONTEXT_KEEP_GIT_DIR": "1",
"BUILDX_EXPERIMENTAL": "1",
"FORMATS": "md",
"GO_VERSION": "1.20"
},
"target": "validate",
"output": [
"type=cacheonly"
]
},
"validate-vendor": {
"context": ".",
"dockerfile": "./hack/dockerfiles/vendor.Dockerfile",
"args": {
"BUILDKIT_CONTEXT_KEEP_GIT_DIR": "1",
"GO_VERSION": "1.20"
},
"target": "validate",
"output": [
"type=cacheonly"
]
}
}
}
+22
View File
@@ -0,0 +1,22 @@
{
"name": "builder2",
"driver": "docker-container",
"lastActivity": "2023-01-16 09:45:23 +0000 UTC",
"nodes": [
{
"buildkit": "v0.11.0",
"buildkitd-flags": "--debug --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host",
"driver-opts": [
"BUILDKIT_STEP_LOG_MAX_SIZE=10485760",
"BUILDKIT_STEP_LOG_MAX_SPEED=10485760",
"JAEGER_TRACE=localhost:6831",
"image=moby/buildkit:latest",
"network=host"
],
"endpoint": "unix:///var/run/docker.sock",
"name": "builder20",
"platforms": "linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6",
"status": "running"
}
]
}
-362
View File
@@ -1,362 +0,0 @@
{
"id": 1296269,
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"owner": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/octocat/Hello-World",
"description": "This your first repo!",
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}",
"assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}",
"blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}",
"branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}",
"collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}",
"comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}",
"commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}",
"compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}",
"contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}",
"contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors",
"deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments",
"downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads",
"events_url": "http://api.github.com/repos/octocat/Hello-World/events",
"forks_url": "http://api.github.com/repos/octocat/Hello-World/forks",
"git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}",
"git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}",
"git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}",
"git_url": "git:github.com/octocat/Hello-World.git",
"issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}",
"issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}",
"issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}",
"keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}",
"labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}",
"languages_url": "http://api.github.com/repos/octocat/Hello-World/languages",
"merges_url": "http://api.github.com/repos/octocat/Hello-World/merges",
"milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}",
"notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}",
"pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}",
"releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers",
"statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}",
"subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers",
"subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription",
"tags_url": "http://api.github.com/repos/octocat/Hello-World/tags",
"teams_url": "http://api.github.com/repos/octocat/Hello-World/teams",
"trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}",
"clone_url": "https://github.com/octocat/Hello-World.git",
"mirror_url": "git:git.example.com/octocat/Hello-World",
"hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks_count": 9,
"stargazers_count": 80,
"watchers_count": 80,
"size": 108,
"default_branch": "master",
"open_issues_count": 0,
"is_template": true,
"topics": [
"octocat",
"atom",
"electron",
"api"
],
"has_issues": true,
"has_projects": true,
"has_wiki": true,
"has_pages": false,
"has_downloads": true,
"archived": false,
"disabled": false,
"visibility": "public",
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z",
"permissions": {
"pull": true,
"triage": true,
"push": false,
"maintain": false,
"admin": false
},
"allow_rebase_merge": true,
"template_repository": null,
"temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O",
"allow_squash_merge": true,
"delete_branch_on_merge": true,
"allow_merge_commit": true,
"subscribers_count": 42,
"network_count": 0,
"license": {
"key": "mit",
"name": "MIT License",
"spdx_id": "MIT",
"url": "https://api.github.com/licenses/mit",
"node_id": "MDc6TGljZW5zZW1pdA=="
},
"organization": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "Organization",
"site_admin": false
},
"parent": {
"id": 1296269,
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"owner": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/octocat/Hello-World",
"description": "This your first repo!",
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}",
"assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}",
"blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}",
"branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}",
"collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}",
"comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}",
"commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}",
"compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}",
"contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}",
"contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors",
"deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments",
"downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads",
"events_url": "http://api.github.com/repos/octocat/Hello-World/events",
"forks_url": "http://api.github.com/repos/octocat/Hello-World/forks",
"git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}",
"git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}",
"git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}",
"git_url": "git:github.com/octocat/Hello-World.git",
"issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}",
"issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}",
"issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}",
"keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}",
"labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}",
"languages_url": "http://api.github.com/repos/octocat/Hello-World/languages",
"merges_url": "http://api.github.com/repos/octocat/Hello-World/merges",
"milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}",
"notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}",
"pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}",
"releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers",
"statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}",
"subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers",
"subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription",
"tags_url": "http://api.github.com/repos/octocat/Hello-World/tags",
"teams_url": "http://api.github.com/repos/octocat/Hello-World/teams",
"trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}",
"clone_url": "https://github.com/octocat/Hello-World.git",
"mirror_url": "git:git.example.com/octocat/Hello-World",
"hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks_count": 9,
"stargazers_count": 80,
"watchers_count": 80,
"size": 108,
"default_branch": "master",
"open_issues_count": 0,
"is_template": true,
"topics": [
"octocat",
"atom",
"electron",
"api"
],
"has_issues": true,
"has_projects": true,
"has_wiki": true,
"has_pages": false,
"has_downloads": true,
"archived": false,
"disabled": false,
"visibility": "public",
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z",
"permissions": {
"admin": false,
"push": false,
"pull": true
},
"allow_rebase_merge": true,
"template_repository": null,
"temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O",
"allow_squash_merge": true,
"delete_branch_on_merge": true,
"allow_merge_commit": true,
"subscribers_count": 42,
"network_count": 0
},
"source": {
"id": 1296269,
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"owner": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/octocat/Hello-World",
"description": "This your first repo!",
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}",
"assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}",
"blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}",
"branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}",
"collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}",
"comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}",
"commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}",
"compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}",
"contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}",
"contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors",
"deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments",
"downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads",
"events_url": "http://api.github.com/repos/octocat/Hello-World/events",
"forks_url": "http://api.github.com/repos/octocat/Hello-World/forks",
"git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}",
"git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}",
"git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}",
"git_url": "git:github.com/octocat/Hello-World.git",
"issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}",
"issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}",
"issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}",
"keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}",
"labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}",
"languages_url": "http://api.github.com/repos/octocat/Hello-World/languages",
"merges_url": "http://api.github.com/repos/octocat/Hello-World/merges",
"milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}",
"notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}",
"pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}",
"releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers",
"statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}",
"subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers",
"subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription",
"tags_url": "http://api.github.com/repos/octocat/Hello-World/tags",
"teams_url": "http://api.github.com/repos/octocat/Hello-World/teams",
"trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}",
"clone_url": "https://github.com/octocat/Hello-World.git",
"mirror_url": "git:git.example.com/octocat/Hello-World",
"hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks_count": 9,
"stargazers_count": 80,
"watchers_count": 80,
"size": 108,
"default_branch": "master",
"open_issues_count": 0,
"is_template": true,
"topics": [
"octocat",
"atom",
"electron",
"api"
],
"has_issues": true,
"has_projects": true,
"has_wiki": true,
"has_pages": false,
"has_downloads": true,
"archived": false,
"disabled": false,
"visibility": "public",
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z",
"permissions": {
"admin": false,
"push": false,
"pull": true
},
"allow_rebase_merge": true,
"template_repository": null,
"temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O",
"allow_squash_merge": true,
"delete_branch_on_merge": true,
"allow_merge_commit": true,
"subscribers_count": 42,
"network_count": 0
}
}
+39
View File
@@ -0,0 +1,39 @@
import fs from 'node:fs';
import os from 'node:os';
import path from 'node:path';
import {vi} from 'vitest';
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-bake-action-'));
const githubPayload = {
repository: {
private: true
}
};
const githubEventPath = path.join(tmpDir, 'github-event.json');
fs.writeFileSync(githubEventPath, JSON.stringify(githubPayload));
process.env = Object.assign({}, process.env, {
TEMP: tmpDir,
GITHUB_REPOSITORY: 'docker/bake-action',
GITHUB_REF: 'refs/heads/master',
GITHUB_RUN_ID: '123456789',
GITHUB_RUN_ATTEMPT: '1',
GITHUB_EVENT_PATH: githubEventPath,
RUNNER_TEMP: path.join(tmpDir, 'runner-temp'),
RUNNER_TOOL_CACHE: path.join(tmpDir, 'runner-tool-cache')
});
vi.mock('@actions/github', () => ({
context: {
repo: {
owner: 'docker',
repo: 'bake-action'
},
ref: 'refs/heads/master',
runId: 123456789,
payload: githubPayload
},
getOctokit: vi.fn()
}));
+15 -13
View File
@@ -10,22 +10,15 @@ inputs:
builder:
description: "Builder instance"
required: false
source:
description: "Context to build from. Can be either local or a remote bake definition"
required: false
allow:
description: "Allow build to access specified resources (e.g., network.host)"
required: false
call:
description: "Set method for evaluating build (e.g., check)"
required: false
files:
description: "List of bake definition files"
required: false
workdir:
description: "Working directory of bake execution"
required: false
default: '.'
targets:
description: "List of bake targets"
required: false
no-cache:
description: "Do not use cache when building the image"
required: false
@@ -51,6 +44,15 @@ inputs:
set:
description: "List of targets values to override (eg. targetpattern.key=value)"
required: false
source:
description: "Context to build from. Can be either local to specify the working directory or a remote bake definition"
required: false
targets:
description: "List of bake targets"
required: false
vars:
description: "Variables to set in the Bake definition as list of key-value pair"
required: false
github-token:
description: "API token used to authenticate to a Git repository for remote definitions"
default: ${{ github.token }}
@@ -61,6 +63,6 @@ outputs:
description: 'Build result metadata'
runs:
using: 'node20'
main: 'dist/index.js'
post: 'dist/index.js'
using: 'node24'
main: 'dist/index.cjs'
post: 'dist/index.cjs'
+19 -10
View File
@@ -1,12 +1,13 @@
# syntax=docker/dockerfile:1
ARG NODE_VERSION=20
ARG NODE_VERSION=24
FROM node:${NODE_VERSION}-alpine AS base
RUN apk add --no-cache cpio findutils git
RUN apk add --no-cache cpio findutils git rsync
WORKDIR /src
RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/.yarn/cache <<EOT
set -e
corepack enable
yarn --version
yarn config set --home enableTelemetry 0
@@ -27,25 +28,34 @@ RUN --mount=type=bind,target=.,rw <<EOT
git add -A
cp -rf /vendor/* .
if [ -n "$(git status --porcelain -- yarn.lock)" ]; then
echo >&2 'ERROR: Vendor result differs. Please vendor your package with "docker buildx bake vendor-update"'
echo >&2 'ERROR: Vendor result differs. Please vendor your package with "docker buildx bake vendor"'
git status --porcelain -- yarn.lock
exit 1
fi
EOT
FROM deps AS build
RUN --mount=type=bind,target=.,rw \
RUN --mount=target=/context \
--mount=type=cache,target=/src/.yarn/cache \
--mount=type=cache,target=/src/node_modules \
yarn run build && mkdir /out && cp -Rf dist /out/
--mount=type=cache,target=/src/node_modules <<EOT
set -e
rsync -a /context/. .
rm -rf dist
yarn run build
mkdir /out
cp -r dist /out
EOT
FROM scratch AS build-update
COPY --from=build /out /
FROM build AS build-validate
RUN --mount=type=bind,target=.,rw <<EOT
RUN --mount=target=/context \
--mount=target=.,type=tmpfs <<EOT
set -e
rsync -a /context/. .
git add -A
rm -rf dist
cp -rf /out/* .
if [ -n "$(git status --porcelain -- dist)" ]; then
echo >&2 'ERROR: Build result differs. Please build first with "docker buildx bake build"'
@@ -58,8 +68,7 @@ FROM deps AS format
RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/.yarn/cache \
--mount=type=cache,target=/src/node_modules \
yarn run format \
&& mkdir /out && find . -name '*.ts' -not -path './node_modules/*' -not -path './.yarn/*' | cpio -pdm /out
yarn run format && mkdir /out && find . -name '*.ts' -not -path './node_modules/*' -not -path './.yarn/*' | cpio -pdm /out
FROM scratch AS format-update
COPY --from=format /out /
@@ -74,7 +83,7 @@ FROM deps AS test
RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/.yarn/cache \
--mount=type=cache,target=/src/node_modules \
yarn run test --coverage --coverageDirectory=/tmp/coverage
yarn run test --coverage --coverage.reportsDirectory=/tmp/coverage
FROM scratch AS test-coverage
COPY --from=test /tmp/coverage /
Generated Vendored
+447
View File
File diff suppressed because one or more lines are too long
+7 -1
View File
File diff suppressed because one or more lines are too long
Generated Vendored
-107
View File
File diff suppressed because one or more lines are too long
Generated Vendored
+4668 -2842
View File
File diff suppressed because it is too large Load Diff
Generated Vendored
-1
View File
File diff suppressed because one or more lines are too long
+52
View File
@@ -0,0 +1,52 @@
import {defineConfig} from 'eslint/config';
import js from '@eslint/js';
import tseslint from '@typescript-eslint/eslint-plugin';
import vitest from '@vitest/eslint-plugin';
import globals from 'globals';
import eslintConfigPrettier from 'eslint-config-prettier/flat';
import eslintPluginPrettier from 'eslint-plugin-prettier';
export default defineConfig([
{
ignores: ['.yarn/**/*', 'coverage/**/*', 'dist/**/*']
},
js.configs.recommended,
...tseslint.configs['flat/recommended'],
eslintConfigPrettier,
{
languageOptions: {
globals: {
...globals.node
}
}
},
{
files: ['__tests__/**'],
...vitest.configs.recommended,
languageOptions: {
globals: {
...globals.node,
...vitest.environments.env.globals
}
},
rules: {
...vitest.configs.recommended.rules,
'vitest/no-conditional-expect': 'error',
'vitest/no-disabled-tests': 0
}
},
{
plugins: {
prettier: eslintPluginPrettier
},
rules: {
'prettier/prettier': 'error',
'@typescript-eslint/no-require-imports': [
'error',
{
allowAsImport: true
}
]
}
}
]);
-30
View File
@@ -1,30 +0,0 @@
import fs from 'fs';
import os from 'os';
import path from 'path';
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-bake-action-'));
process.env = Object.assign({}, process.env, {
TEMP: tmpDir,
GITHUB_REPOSITORY: 'docker/bake-action',
RUNNER_TEMP: path.join(tmpDir, 'runner-temp'),
RUNNER_TOOL_CACHE: path.join(tmpDir, 'runner-tool-cache')
}) as {
[key: string]: string;
};
module.exports = {
clearMocks: true,
testEnvironment: 'node',
moduleFileExtensions: ['js', 'ts'],
testMatch: ['**/*.test.ts'],
transform: {
'^.+\\.ts$': 'ts-jest'
},
moduleNameMapper: {
'^csv-parse/sync': '<rootDir>/node_modules/csv-parse/dist/cjs/sync.cjs'
},
collectCoverageFrom: ['src/**/{!(main.ts),}.ts'],
coveragePathIgnorePatterns: ['lib/', 'node_modules/', '__mocks__/', '__tests__/'],
verbose: true
};
+25 -25
View File
@@ -1,16 +1,14 @@
{
"name": "docker-buildx-bake",
"description": "GitHub Action to use Docker Buildx Bake as a high-level build command",
"type": "module",
"main": "src/main.ts",
"scripts": {
"build": "ncc build --source-map --minify --license licenses.txt",
"lint": "yarn run prettier && yarn run eslint",
"format": "yarn run prettier:fix && yarn run eslint:fix",
"eslint": "eslint --max-warnings=0 .",
"eslint:fix": "eslint --fix .",
"prettier": "prettier --check \"./**/*.ts\"",
"prettier:fix": "prettier --write \"./**/*.ts\"",
"test": "jest"
"build": "esbuild src/main.ts --bundle --platform=node --target=node24 --format=cjs --outfile=dist/index.cjs --sourcemap --minify && yarn run license",
"lint": "eslint --max-warnings=0 .",
"format": "eslint --fix .",
"test": "vitest run",
"license": "generate-license-file --input package.json --output dist/licenses.txt --overwrite --ci --no-spinner --eol lf"
},
"repository": {
"type": "git",
@@ -24,25 +22,27 @@
],
"author": "Docker Inc.",
"license": "Apache-2.0",
"packageManager": "yarn@3.6.3",
"packageManager": "yarn@4.15.0",
"dependencies": {
"@actions/core": "^1.11.1",
"@docker/actions-toolkit": "^0.62.1",
"handlebars": "^4.7.8"
"@actions/core": "^3.0.1",
"@docker/actions-toolkit": "^0.91.0",
"handlebars": "^4.7.9"
},
"devDependencies": {
"@types/node": "^20.12.12",
"@typescript-eslint/eslint-plugin": "^7.9.0",
"@typescript-eslint/parser": "^7.9.0",
"@vercel/ncc": "^0.38.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.5.0",
"eslint-plugin-prettier": "^5.1.3",
"jest": "^29.7.0",
"prettier": "^3.2.5",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
"typescript": "^5.4.5"
"@eslint/js": "^9.39.3",
"@types/node": "^24.11.0",
"@typescript-eslint/eslint-plugin": "^8.56.1",
"@typescript-eslint/parser": "^8.56.1",
"@vitest/coverage-v8": "^4.0.18",
"@vitest/eslint-plugin": "^1.6.9",
"esbuild": "^0.28.0",
"eslint": "^9.39.3",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.5",
"generate-license-file": "^4.1.1",
"globals": "^17.3.0",
"prettier": "^3.8.1",
"typescript": "^5.9.3",
"vitest": "^4.0.18"
}
}
+74 -37
View File
@@ -1,21 +1,25 @@
import * as fs from 'fs';
import * as core from '@actions/core';
import * as handlebars from 'handlebars';
import {Bake} from '@docker/actions-toolkit/lib/buildx/bake';
import {Build} from '@docker/actions-toolkit/lib/buildx/build';
import {Context} from '@docker/actions-toolkit/lib/context';
import {GitHub} from '@docker/actions-toolkit/lib/github';
import {Toolkit} from '@docker/actions-toolkit/lib/toolkit';
import {Util} from '@docker/actions-toolkit/lib/util';
import {Bake} from '@docker/actions-toolkit/lib/buildx/bake.js';
import {Build} from '@docker/actions-toolkit/lib/buildx/build.js';
import {GitHub} from '@docker/actions-toolkit/lib/github/github.js';
import {Toolkit} from '@docker/actions-toolkit/lib/toolkit.js';
import {Util} from '@docker/actions-toolkit/lib/util.js';
import {BakeDefinition} from '@docker/actions-toolkit/lib/types/buildx/bake';
import {BakeDefinition} from '@docker/actions-toolkit/lib/types/buildx/bake.js';
export interface BakeContext {
remoteRef?: string;
workdir?: string;
}
export interface Inputs {
allow: string[];
builder: string;
allow: string[];
call: string;
files: string[];
workdir: string;
targets: string[];
'no-cache': boolean;
pull: boolean;
load: boolean;
@@ -23,17 +27,18 @@ export interface Inputs {
push: boolean;
sbom: string;
set: string[];
source: string;
source: BakeContext;
targets: string[];
vars: string[];
'github-token': string;
}
export async function getInputs(): Promise<Inputs> {
return {
allow: Util.getInputList('allow'),
builder: core.getInput('builder'),
allow: Util.getInputList('allow'),
call: core.getInput('call'),
files: Util.getInputList('files'),
workdir: core.getInput('workdir') || '.',
targets: Util.getInputList('targets'),
'no-cache': core.getBooleanInput('no-cache'),
pull: core.getBooleanInput('pull'),
load: core.getBooleanInput('load'),
@@ -41,7 +46,9 @@ export async function getInputs(): Promise<Inputs> {
push: core.getBooleanInput('push'),
sbom: core.getInput('sbom'),
set: Util.getInputList('set', {ignoreComma: true, quote: false}),
source: getSourceInput('source'),
source: await getBakeContext(core.getInput('source')),
targets: Util.getInputList('targets'),
vars: Util.getInputList('vars', {ignoreComma: true, quote: false}),
'github-token': core.getInput('github-token')
};
}
@@ -57,24 +64,38 @@ export async function getArgs(inputs: Inputs, definition: BakeDefinition, toolki
async function getBakeArgs(inputs: Inputs, definition: BakeDefinition, toolkit: Toolkit): Promise<Array<string>> {
const args: Array<string> = ['bake'];
if (inputs.source) {
args.push(inputs.source);
if (inputs.source.remoteRef) {
args.push(inputs.source.remoteRef);
}
if (await toolkit.buildx.versionSatisfies('>=0.17.0')) {
if (await toolkit.buildx.versionSatisfies('>=0.18.0')) {
// allow filesystem entitlements by default
inputs.allow.push('fs=*');
}
await Util.asyncForEach(inputs.allow, async allow => {
await Util.asyncForEach(inputs.allow, async (allow: string) => {
args.push('--allow', allow);
});
}
await Util.asyncForEach(inputs.files, async file => {
if (inputs.call) {
if (!(await toolkit.buildx.versionSatisfies('>=0.16.0'))) {
throw new Error(`Buildx >= 0.16.0 is required to use the call input.`);
}
args.push('--call', inputs.call);
}
await Util.asyncForEach(inputs.files, async (file: string) => {
args.push('--file', file);
});
await Util.asyncForEach(inputs.set, async set => {
args.push('--set', set);
await Util.asyncForEach(inputs.set, async (s: string) => {
args.push('--set', s);
});
if (inputs.vars.length > 0) {
if (!(await toolkit.buildx.versionSatisfies('>=0.31.0'))) {
throw new Error(`Buildx >= 0.31.0 is required to use the vars input.`);
}
await Util.asyncForEach(inputs.vars, async (v: string) => {
args.push('--var', v);
});
}
if (await toolkit.buildx.versionSatisfies('>=0.6.0')) {
args.push('--metadata-file', toolkit.buildxBake.getMetadataFilePath());
}
@@ -82,16 +103,22 @@ async function getBakeArgs(inputs: Inputs, definition: BakeDefinition, toolkit:
if (inputs.provenance) {
args.push('--provenance', inputs.provenance);
} else if (!noDefaultAttestations() && (await toolkit.buildkit.versionSatisfies(inputs.builder, '>=0.11.0')) && !Bake.hasDockerExporter(definition, inputs.load)) {
// if provenance not specified and BuildKit version compatible for
// check if provenance attestation is already specified in the bake
// definition and if not specified and BuildKit version compatible for
// attestation, set default provenance. Also needs to make sure user
// doesn't want to explicitly load the image to docker.
if (GitHub.context.payload.repository?.private ?? false) {
// if this is a private repository, we set the default provenance
// attributes being set in buildx: https://github.com/docker/buildx/blob/fb27e3f919dcbf614d7126b10c2bc2d0b1927eb6/build/build.go#L603
args.push('--provenance', Build.resolveProvenanceAttrs(`mode=min,inline-only=true`));
} else {
// for a public repository, we set max provenance mode.
args.push('--provenance', Build.resolveProvenanceAttrs(`mode=max`));
for (const targetName in definition.target) {
const target = definition.target[targetName];
if (!Array.isArray(target.attest) || !target.attest.some(attest => attest?.type === 'provenance')) {
if (GitHub.context.payload.repository?.private ?? false) {
// if this is a private repository, we set the default provenance
// attributes being set in buildx: https://github.com/docker/buildx/blob/fb27e3f919dcbf614d7126b10c2bc2d0b1927eb6/build/build.go#L603
args.push('--set', `${targetName}.attest=type=provenance,${Build.resolveProvenanceAttrs(`mode=min,inline-only=true`)}`);
} else {
// for a public repository, we set max provenance mode.
args.push('--set', `${targetName}.attest=type=provenance,${Build.resolveProvenanceAttrs(`mode=max`)}`);
}
}
}
}
if (inputs.sbom) {
@@ -121,17 +148,27 @@ async function getCommonArgs(inputs: Inputs): Promise<Array<string>> {
return args;
}
function getSourceInput(name: string): string {
let source = handlebars.compile(core.getInput(name))({
defaultContext: Context.gitContext()
async function getBakeContext(sourceInput: string): Promise<BakeContext> {
const defaultContext = await new Build().gitContext();
let bakeContext = handlebars.compile(sourceInput)({
defaultContext: defaultContext
});
if (!source) {
source = Context.gitContext();
if (!bakeContext) {
bakeContext = defaultContext;
}
if (source === '.') {
source = '';
if (Util.isValidRef(bakeContext)) {
return {
remoteRef: bakeContext
};
}
return source;
try {
fs.statSync(sourceInput).isDirectory();
} catch {
throw new Error(`Invalid source: ${sourceInput} does not exist or is not a directory.`);
}
return {
workdir: bakeContext
};
}
function noDefaultAttestations(): boolean {
+50 -45
View File
@@ -3,22 +3,24 @@ import * as path from 'path';
import * as core from '@actions/core';
import * as actionsToolkit from '@docker/actions-toolkit';
import {Buildx} from '@docker/actions-toolkit/lib/buildx/buildx';
import {History as BuildxHistory} from '@docker/actions-toolkit/lib/buildx/history';
import {Context} from '@docker/actions-toolkit/lib/context';
import {Docker} from '@docker/actions-toolkit/lib/docker/docker';
import {Exec} from '@docker/actions-toolkit/lib/exec';
import {GitHub} from '@docker/actions-toolkit/lib/github';
import {Toolkit} from '@docker/actions-toolkit/lib/toolkit';
import {Util} from '@docker/actions-toolkit/lib/util';
import {Buildx} from '@docker/actions-toolkit/lib/buildx/buildx.js';
import {History as BuildxHistory} from '@docker/actions-toolkit/lib/buildx/history.js';
import {Context} from '@docker/actions-toolkit/lib/context.js';
import {Docker} from '@docker/actions-toolkit/lib/docker/docker.js';
import {Exec} from '@docker/actions-toolkit/lib/exec.js';
import {GitHub} from '@docker/actions-toolkit/lib/github/github.js';
import {GitHubArtifact} from '@docker/actions-toolkit/lib/github/artifact.js';
import {GitHubSummary} from '@docker/actions-toolkit/lib/github/summary.js';
import {Toolkit} from '@docker/actions-toolkit/lib/toolkit.js';
import {Util} from '@docker/actions-toolkit/lib/util.js';
import {BakeDefinition} from '@docker/actions-toolkit/lib/types/buildx/bake';
import {BuilderInfo} from '@docker/actions-toolkit/lib/types/buildx/builder';
import {ConfigFile} from '@docker/actions-toolkit/lib/types/docker/docker';
import {UploadArtifactResponse} from '@docker/actions-toolkit/lib/types/github';
import {BakeDefinition} from '@docker/actions-toolkit/lib/types/buildx/bake.js';
import {BuilderInfo} from '@docker/actions-toolkit/lib/types/buildx/builder.js';
import {ConfigFile} from '@docker/actions-toolkit/lib/types/docker/docker.js';
import {UploadResponse as UploadArtifactResponse} from '@docker/actions-toolkit/lib/types/github/artifact.js';
import * as context from './context';
import * as stateHelper from './state-helper';
import * as context from './context.js';
import * as stateHelper from './state-helper.js';
actionsToolkit.run(
// main
@@ -105,12 +107,13 @@ actionsToolkit.run(
provenance: inputs.provenance,
push: inputs.push,
sbom: inputs.sbom,
source: inputs.source,
source: inputs.source.remoteRef,
targets: inputs.targets,
vars: inputs.vars,
githubToken: gitAuthToken
},
{
cwd: inputs.workdir
cwd: inputs.source.workdir
}
);
});
@@ -130,7 +133,7 @@ actionsToolkit.run(
await core.group(`Bake definition`, async () => {
await Exec.getExecOutput(buildCmd.command, [...buildCmd.args, '--print'], {
cwd: inputs.workdir,
cwd: inputs.source.workdir,
env: buildEnv,
ignoreReturnCode: true
}).then(res => {
@@ -142,12 +145,30 @@ actionsToolkit.run(
let err: Error | undefined;
await Exec.getExecOutput(buildCmd.command, buildCmd.args, {
cwd: inputs.workdir,
cwd: inputs.source.workdir,
env: buildEnv,
ignoreReturnCode: true
}).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) {
err = Error(`buildx bake failed with: ${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`);
if (res.exitCode != 0) {
if (inputs.call && inputs.call === 'check' && res.stdout.length > 0) {
// checks warnings are printed to stdout: https://github.com/docker/buildx/pull/2647
// with bake we can have multiple targets being checked so we need to
// count the total number of warnings
const totalWarnings = [...res.stdout.matchAll(/^Check complete, (\d+) warnings? (?:has|have) been found!/gm)].reduce((sum, m) => sum + parseInt(m[1], 10), 0);
if (totalWarnings > 0) {
// https://github.com/docker/buildx/blob/1e50e8ddabe108f009b9925e13a321d7c8f99f26/commands/build.go#L797-L803
if (totalWarnings === 1) {
err = Error(`Check complete, ${totalWarnings} warning has been found!`);
} else {
err = Error(`Check complete, ${totalWarnings} warnings have been found!`);
}
} else {
// if there are no warnings found, return the first line of stdout
err = Error(res.stdout.split('\n')[0]?.trim());
}
} else if (res.stderr.length > 0) {
err = Error(`buildx bake failed with: ${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`);
}
}
});
@@ -191,10 +212,12 @@ actionsToolkit.run(
await core.group(`Check build summary support`, async () => {
if (!buildSummaryEnabled()) {
core.info('Build summary disabled');
} else if (inputs.call && inputs.call !== 'build') {
core.info(`Build summary skipped for ${inputs.call} subrequest`);
} else if (GitHub.isGHES) {
core.info('Build summary is not yet supported on GHES');
} else if (!(await toolkit.buildx.versionSatisfies('>=0.13.0'))) {
core.info('Build summary requires Buildx >= 0.13.0');
} else if (!(await toolkit.buildx.versionSatisfies('>=0.23.0'))) {
core.info('Build summary requires Buildx >= 0.23.0');
} else if (refs.length == 0) {
core.info('Build summary requires at least one build reference');
} else {
@@ -220,21 +243,19 @@ actionsToolkit.run(
const buildxHistory = new BuildxHistory();
const exportRes = await buildxHistory.export({
refs: stateHelper.buildRefs,
useContainer: buildExportLegacy()
refs: stateHelper.buildRefs
});
core.info(`Build records written to ${exportRes.dockerbuildFilename} (${Util.formatFileSize(exportRes.dockerbuildSize)})`);
let uploadRes: UploadArtifactResponse | undefined;
if (recordUploadEnabled) {
uploadRes = await GitHub.uploadArtifact({
uploadRes = await GitHubArtifact.upload({
filename: exportRes.dockerbuildFilename,
mimeType: 'application/gzip',
retentionDays: recordRetentionDays
});
}
await GitHub.writeBuildSummary({
await GitHubSummary.writeBuildSummary({
exportRes: exportRes,
uploadRes: uploadRes,
inputs: stateHelper.summaryInputs,
@@ -288,10 +309,7 @@ function buildChecksAnnotationsEnabled(): boolean {
}
function buildSummaryEnabled(): boolean {
if (process.env.DOCKER_BUILD_NO_SUMMARY) {
core.warning('DOCKER_BUILD_NO_SUMMARY is deprecated. Set DOCKER_BUILD_SUMMARY to false instead.');
return !Util.parseBool(process.env.DOCKER_BUILD_NO_SUMMARY);
} else if (process.env.DOCKER_BUILD_SUMMARY) {
if (process.env.DOCKER_BUILD_SUMMARY) {
return Util.parseBool(process.env.DOCKER_BUILD_SUMMARY);
}
return true;
@@ -305,13 +323,7 @@ function buildRecordUploadEnabled(): boolean {
}
function buildRecordRetentionDays(): number | undefined {
let val: string | undefined;
if (process.env.DOCKER_BUILD_EXPORT_RETENTION_DAYS) {
core.warning('DOCKER_BUILD_EXPORT_RETENTION_DAYS is deprecated. Use DOCKER_BUILD_RECORD_RETENTION_DAYS instead.');
val = process.env.DOCKER_BUILD_EXPORT_RETENTION_DAYS;
} else if (process.env.DOCKER_BUILD_RECORD_RETENTION_DAYS) {
val = process.env.DOCKER_BUILD_RECORD_RETENTION_DAYS;
}
const val = process.env.DOCKER_BUILD_RECORD_RETENTION_DAYS;
if (val) {
const res = parseInt(val);
if (isNaN(res)) {
@@ -320,10 +332,3 @@ function buildRecordRetentionDays(): number | undefined {
return res;
}
}
function buildExportLegacy(): boolean {
if (process.env.DOCKER_BUILD_EXPORT_LEGACY) {
return Util.parseBool(process.env.DOCKER_BUILD_EXPORT_LEGACY);
}
return false;
}
+6 -3
View File
@@ -1,8 +1,8 @@
import * as core from '@actions/core';
import {BakeDefinition} from '@docker/actions-toolkit/lib/types/buildx/bake';
import {BakeDefinition} from '@docker/actions-toolkit/lib/types/buildx/bake.js';
import {Inputs} from './context';
import {Inputs} from './context.js';
export const tmpDir = process.env['STATE_tmpDir'] || '';
@@ -40,8 +40,11 @@ export function setSummarySupported() {
export function setSummaryInputs(inputs: Inputs) {
const res = {};
if (inputs.source.remoteRef || inputs.source.workdir) {
res['source'] = inputs.source.remoteRef || inputs.source.workdir;
}
for (const key of Object.keys(inputs)) {
if (key === 'github-token') {
if (key === 'source' || key === 'github-token') {
continue;
}
const value: string | string[] | boolean = inputs[key];
-84
View File
@@ -1,84 +0,0 @@
## About
This subaction generates a list of Bake targets that can be used in a [GitHub matrix](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix),
so you can distribute your builds across multiple runners.
![Screenshot](../../.github/bake-action.png)
___
* [Usage](#usage)
* [Customizing](#customizing)
* [inputs](#inputs)
* [outputs](#outputs)
## Usage
```hcl
# docker-bake.hcl
group "validate" {
targets = ["lint", "doctoc"]
}
target "lint" {
target = "lint"
}
target "doctoc" {
target = "doctoc"
}
```
```yaml
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.generate.outputs.targets }}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: List targets
id: generate
uses: docker/bake-action/subaction/list-targets@v6
with:
target: validate
validate:
runs-on: ubuntu-latest
needs:
- prepare
strategy:
fail-fast: false
matrix:
target: ${{ fromJson(needs.prepare.outputs.targets) }}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Validate
uses: docker/bake-action@v6
with:
targets: ${{ matrix.target }}
```
## Customizing
### inputs
| Name | Type | Description |
|--------------|-------------|---------------------------------------------------------------------------------------------------------------------------------------------|
| `workdir` | String | Working directory to use (defaults to `.`) |
| `files` | List/CSV | List of [bake definition files](https://docs.docker.com/build/customize/bake/file-definition/) |
| `target` | String | The target to use within the bake file |
### outputs
The following outputs are available
| Name | Type | Description |
|------------|----------|----------------------------|
| `targets` | List/CSV | List of extracted targest |
-61
View File
@@ -1,61 +0,0 @@
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions
name: 'List Bake targets'
description: 'Generate a list of Bake targets to help distributing builds in your workflow'
inputs:
workdir:
description: Working directory
default: '.'
required: false
files:
description: Comma separated list of Bake files
required: false
target:
description: Bake target
required: false
outputs:
targets:
description: List of targets
value: ${{ steps.generate.outputs.targets }}
runs:
using: composite
steps:
-
name: Generate
id: generate
uses: actions/github-script@v7
with:
script: |
let def;
const files = `${{ inputs.files }}` ? `${{ inputs.files }}`.split(/[\r?\n,]+/).filter(Boolean) : [];
const target = `${{ inputs.target }}`;
await core.group(`Validating definition`, async () => {
let args = ['buildx', 'bake'];
for (const file of files) {
args.push('--file', file);
}
if (target) {
args.push(target);
}
args.push('--print');
const res = await exec.getExecOutput('docker', args, {
ignoreReturnCode: true,
silent: true,
cwd: `${{ inputs.workdir }}`
});
if (res.stderr.length > 0 && res.exitCode != 0) {
throw new Error(res.stderr);
}
def = JSON.parse(res.stdout.trim());
core.info(JSON.stringify(def, null, 2));
});
await core.group(`Set output`, async () => {
const targets = Object.keys(def.target);
core.info(`targets: ${JSON.stringify(targets)}`);
core.setOutput('targets', JSON.stringify(targets));
});
+140
View File
@@ -0,0 +1,140 @@
## About
This subaction generates a multi-dimension matrix that can be used in a [GitHub matrix](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix)
through the [`include` property](https://docs.github.com/en/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/running-variations-of-jobs-in-a-workflow#expanding-or-adding-matrix-configurations)
so you can distribute your builds across multiple runners.
![Screenshot](../../.github/subaction-matrix.png)
___
* [Usage](#usage)
* [Customizing](#customizing)
* [inputs](#inputs)
* [outputs](#outputs)
## Usage
### List targets
```hcl
# docker-bake.hcl
group "validate" {
targets = ["lint", "doctoc"]
}
target "lint" {
target = "lint"
}
target "doctoc" {
target = "doctoc"
}
```
```yaml
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.generate.outputs.matrix }}
steps:
-
name: Checkout
uses: actions/checkout@v6
-
name: Generate matrix
id: generate
uses: docker/bake-action/subaction/matrix@v7
with:
target: validate
validate:
runs-on: ubuntu-latest
needs:
- prepare
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.prepare.outputs.matrix) }}
steps:
-
name: Validate
uses: docker/bake-action@v7
with:
targets: ${{ matrix.target }}
```
### Platforms split
```hcl
# docker-bake.hcl
target "lint" {
dockerfile = "./hack/dockerfiles/lint.Dockerfile"
output = ["type=cacheonly"]
platforms = [
"darwin/amd64",
"darwin/arm64",
"linux/amd64",
"linux/arm64",
"linux/s390x",
"linux/ppc64le",
"linux/riscv64",
"windows/amd64",
"windows/arm64"
]
}
```
```yaml
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.generate.outputs.matrix }}
steps:
-
name: Checkout
uses: actions/checkout@v6
-
name: Generate matrix
id: generate
uses: docker/bake-action/subaction/matrix@v7
with:
target: lint
fields: platforms
lint:
runs-on: ${{ startsWith(matrix.platforms, 'linux/arm') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
needs:
- prepare
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.prepare.outputs.matrix) }}
steps:
-
name: Lint
uses: docker/bake-action@v7
with:
targets: ${{ matrix.target }}
set: |
*.platform=${{ matrix.platforms }}
```
## Customizing
### inputs
| Name | Type | Description |
|-----------|----------|------------------------------------------------------------------------------------------------|
| `workdir` | String | Working directory to use (defaults to `.`) |
| `files` | List/CSV | List of [bake definition files](https://docs.docker.com/build/customize/bake/file-definition/) |
| `target` | String | The target to use within the bake file |
| `fields` | String | List of extra fields to include in the matrix |
### outputs
| Name | Type | Description |
|----------|------|----------------------|
| `matrix` | JSON | Matrix configuration |
+101
View File
@@ -0,0 +1,101 @@
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions
name: 'Matrix'
description: 'Generate a matrix from a Bake definition to help distributing builds in your workflow'
inputs:
workdir:
description: Working directory
default: '.'
required: false
files:
description: List of Bake files
required: false
target:
description: Bake target
required: false
fields:
description: List of extra fields to include in the matrix
required: false
outputs:
matrix:
description: Matrix configuration
value: ${{ steps.generate.outputs.includes }}
runs:
using: composite
steps:
-
name: Generate
id: generate
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
INPUT_WORKDIR: ${{ inputs.workdir }}
INPUT_FILES: ${{ inputs.files }}
INPUT_TARGET: ${{ inputs.target }}
INPUT_FIELDS: ${{ inputs.fields }}
with:
script: |
function getInputList(name) {
return core.getInput(name) ? core.getInput(name).split(/[\r?\n,]+/).filter(x => x !== '') : [];
}
const workdir = core.getInput('workdir');
const files = getInputList('files');
const target = core.getInput('target');
const fields = getInputList('fields');
let def = {};
await core.group(`Parsing definition`, async () => {
let args = ['buildx', 'bake'];
for (const file of files) {
args.push('--file', file);
}
if (target) {
args.push(target);
}
args.push('--print');
const res = await exec.getExecOutput('docker', args, {
ignoreReturnCode: true,
silent: true,
cwd: workdir
});
if (res.stderr.length > 0 && res.exitCode != 0) {
throw new Error(res.stderr);
}
def = JSON.parse(res.stdout.trim());
core.info(JSON.stringify(def, null, 2));
});
await core.group(`Generating matrix`, async () => {
const result = [];
for (const targetName of Object.keys(def.target)) {
const target = def.target[targetName];
const entry = { target: targetName };
if (fields.length === 0) {
result.push({ ...entry });
continue;
}
let fieldFound = false;
Object.keys(target).forEach(field => {
if (fields.includes(field)) {
fieldFound = true;
const value = target[field];
if (Array.isArray(value)) {
value.forEach((v) => {
entry[field] = v;
result.push({ ...entry });
});
} else {
entry[field] = value;
result.push({ ...entry });
}
}
});
if (!fieldFound) {
result.push({ ...entry });
}
}
core.info(JSON.stringify(result, null, 2));
core.setOutput('includes', JSON.stringify(result));
});
+10
View File
@@ -0,0 +1,10 @@
# syntax=docker/dockerfile:1
FROM busybox AS t1
RUN echo "Hello t1"
FROM busybox AS t2
RUN echo "Hello t2"
FROM busybox AS t3
RUN echo "Hello t3"
+17
View File
@@ -0,0 +1,17 @@
group "default" {
targets = ["t1", "t2", "t3"]
}
target "t1" {
target = "t1"
}
target "t2" {
target = "t2"
attest = ["type=provenance,mode=min"]
}
target "t3" {
target = "t3"
attest = ["type=sbom"]
}
+9 -4
View File
@@ -6,21 +6,26 @@ group "release" {
targets = ["db", "app-plus"]
}
# Special target: https://github.com/docker/metadata-action#bake-definition
target "docker-metadata-action" {
tags = [
"localhost:5000/name/app:latest",
"localhost:5000/name/app:1.0.0"
]
}
target "db" {
context = "./test"
tags = ["docker.io/tonistiigi/db"]
}
target "app" {
inherits = ["docker-metadata-action"]
context = "./test"
dockerfile = "Dockerfile"
args = {
name = "foo"
}
tags = [
"localhost:5000/name/app:latest",
"localhost:5000/name/app:1.0.0"
]
}
target "cross" {
+36
View File
@@ -0,0 +1,36 @@
group "validate" {
targets = ["lint", "lint-gopls", "validate-vendor", "validate-docs"]
}
target "lint" {
dockerfile = "./hack/dockerfiles/lint.Dockerfile"
output = ["type=cacheonly"]
platforms = [
"darwin/amd64",
"darwin/arm64",
"linux/amd64",
"linux/arm64",
"linux/s390x",
"linux/ppc64le",
"linux/riscv64",
"windows/amd64",
"windows/arm64"
]
}
target "lint-gopls" {
inherits = ["lint"]
target = "gopls-analyze"
}
target "validate-vendor" {
dockerfile = "./hack/dockerfiles/vendor.Dockerfile"
target = "validate"
output = ["type=cacheonly"]
}
target "validate-docs" {
dockerfile = "./hack/dockerfiles/docs.Dockerfile"
target = "validate"
output = ["type=cacheonly"]
}
+4 -9
View File
@@ -1,9 +1,8 @@
{
"compilerOptions": {
"module": "nodenext",
"moduleResolution": "nodenext",
"esModuleInterop": true,
"target": "es6",
"module": "commonjs",
"strict": true,
"newLine": "lf",
"outDir": "./lib",
"rootDir": "./src",
@@ -12,11 +11,7 @@
"resolveJsonModule": true,
"useUnknownInCatchVariables": false,
},
"exclude": [
"./__mocks__/**/*",
"./__tests__/**/*",
"./lib/**/*",
"node_modules",
"jest.config.ts"
"include": [
"src/**/*.ts"
]
}
+16
View File
@@ -0,0 +1,16 @@
import {defineConfig} from 'vitest/config';
export default defineConfig({
test: {
clearMocks: true,
environment: 'node',
setupFiles: ['./__tests__/setup.unit.ts'],
include: ['**/*.test.ts'],
coverage: {
provider: 'v8',
reporter: ['clover'],
include: ['src/**/*.ts'],
exclude: ['src/**/main.ts']
}
}
});
+4048 -4612
View File
File diff suppressed because it is too large Load Diff