Compare commits

..

255 Commits

Author SHA1 Message Date
263435318d Merge pull request #1381 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.62.1
chore(deps): Bump @docker/actions-toolkit from 0.61.0 to 0.62.1
2025-05-27 18:32:33 +02:00
c0432d2e01 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-27 18:24:03 +02:00
0bb1f27d6b set builder driver and endpoint attributes for dbc summary support
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-27 18:23:18 +02:00
5f9dbf956c chore(deps): Bump @docker/actions-toolkit from 0.61.0 to 0.62.1
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.61.0 to 0.62.1.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.61.0...v0.62.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-27 16:21:00 +00:00
0788c444d8 Merge pull request #1375 from crazy-max/remove-gcr
e2e: remove GCR
2025-05-15 15:48:50 +02:00
aa179ca4f4 e2e: remove GCR
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-15 15:02:58 +02:00
1dc7386353 Merge pull request #1364 from crazy-max/history-export-cmd
Bump @docker/actions-toolkit from 0.59.0 to 0.61.0
2025-05-15 10:18:19 +02:00
9c9803f364 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-13 13:34:30 +02:00
db1f6c46e8 DOCKER_BUILD_EXPORT_LEGACY env var to opt-in for legacy export
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-13 13:34:30 +02:00
721e8c79de Bump @docker/actions-toolkit from 0.59.0 to 0.61.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-13 13:34:29 +02:00
14487ce63c Merge pull request #1343 from crazy-max/fix-no-default-attest
handle no default attestations env var
2025-04-23 18:39:17 +02:00
0ec91264d8 Merge pull request #1366 from crazy-max/pr-assign-author
pr-assign-author workflow
2025-04-23 16:10:45 +02:00
b749522b90 pr-assign-author workflow
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-04-23 14:15:19 +02:00
c566248492 Merge pull request #1363 from crazy-max/fix-codecov
ci: fix missing source for codecov
2025-04-22 14:23:11 +02:00
13275dd76e ci: fix missing source for codecov
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-04-22 14:11:25 +02:00
67dc78bbaf Merge pull request #1361 from mschoettle/patch-1
docs: add validating build configuration example
2025-04-17 17:12:36 +02:00
0760504437 docs: add validating build configuration example
Signed-off-by: Matthias Schoettle <git@mattsch.com>
2025-04-17 10:14:30 -04:00
1c198f4467 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-04-09 18:58:46 +02:00
288d9e2e4a handle no default attestations env var
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-04-09 18:48:40 +02:00
88844b95d8 Merge pull request #1353 from crazy-max/summary-secret-keys
only print secret keys in build summary output
2025-04-09 18:48:07 +02:00
1be4244e8d chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-04-09 13:28:49 +02:00
094d2bc0cd only print secret keys in build summary output
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-04-09 13:27:52 +02:00
548776e8d0 Merge pull request #1352 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.59.0
chore(deps): Bump @docker/actions-toolkit from 0.56.0 to 0.59.0
2025-04-08 17:50:15 +02:00
91838c2ba3 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-04-08 17:47:27 +02:00
1332e65dc3 chore(deps): Bump @docker/actions-toolkit from 0.56.0 to 0.59.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.56.0 to 0.59.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.56.0...v0.59.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-08 15:44:44 +00:00
66147ca503 Merge pull request #1344 from k-kbk/add-exception-handling
refactor: add missing 'new' and exception handling
2025-04-07 14:46:26 +02:00
8ea72f78e8 chore: update dist
Signed-off-by: k-kbk <kkbk0077@gmail.com>
2025-04-01 23:28:50 +09:00
6481840af9 refactor: add missing 'new' and exception handling
Signed-off-by: Bokyeom <79684339+k-kbk@users.noreply.github.com>
2025-04-01 11:36:44 +09:00
84ad562665 Merge pull request #1337 from crazy-max/note-download-artifact
note about usage of summary feature with download-artifact action
2025-03-10 16:09:21 +01:00
9bea05fc44 note about usage of summary feature with download-artifact action
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-03-10 11:16:14 +01:00
471d1dc4e0 Merge pull request #1330 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.56.0
chore(deps): Bump @docker/actions-toolkit from 0.55.0 to 0.56.0
2025-02-26 15:30:30 +01:00
b89ff0a6f2 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-02-26 15:27:47 +01:00
1e3ae3a4d3 chore(deps): Bump @docker/actions-toolkit from 0.55.0 to 0.56.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.55.0 to 0.56.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.55.0...v0.56.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-26 14:25:15 +00:00
b16f42f92a Merge pull request #1325 from crazy-max/buildx-edge
ci: update buildx to edge and buildkit to latest
2025-02-20 12:00:07 +01:00
dc0fea5e62 ci: update buildx to edge and buildkit to latest
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-02-20 11:56:02 +01:00
0adf995921 Merge pull request #1324 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.55.0
chore(deps): Bump @docker/actions-toolkit from 0.53.0 to 0.55.0
2025-02-19 16:05:15 +01:00
d88cd289df chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-02-19 15:28:34 +01:00
3d09a6bd70 chore(deps): Bump @docker/actions-toolkit from 0.53.0 to 0.55.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.53.0 to 0.55.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.53.0...v0.55.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-19 14:26:59 +00:00
ca877d9245 Merge pull request #1308 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.53.0
chore(deps): Bump @docker/actions-toolkit from 0.51.0 to 0.53.0
2025-01-24 10:23:33 +01:00
d2fe919bb5 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-01-24 10:19:21 +01:00
f0fc9ece82 chore(deps): Bump @docker/actions-toolkit from 0.51.0 to 0.53.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.51.0 to 0.53.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.51.0...v0.53.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-23 11:30:16 +00:00
67a2d409c0 Merge pull request #1300 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.51.0
chore(deps): Bump @docker/actions-toolkit from 0.49.0 to 0.51.0
2025-01-15 13:50:03 +01:00
0b1b1c9c43 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-01-15 13:44:43 +01:00
b6a7c2c4ee chore(deps): Bump @docker/actions-toolkit from 0.49.0 to 0.51.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.49.0 to 0.51.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.49.0...v0.51.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-15 12:07:48 +00:00
31ca4e5d51 Merge pull request #1296 from crazy-max/bake-v6
update bake-action to v6
2025-01-08 18:54:38 +01:00
e613db9d5a update bake-action to v6
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-01-08 12:54:04 +01:00
b32b51a8ed Merge pull request #1281 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.49.0
chore(deps): Bump @docker/actions-toolkit from 0.46.0 to 0.49.0
2025-01-08 10:14:20 +01:00
594bf46f0f Merge pull request #1294 from crazy-max/fix-e2e
ci(e2e): fix setup docker config
2025-01-08 10:14:00 +01:00
fd37bd55af ci(e2e): fix setup docker config
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-01-08 10:09:44 +01:00
e6478a2405 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-01-08 10:02:55 +01:00
78785bddff chore(deps): Bump @docker/actions-toolkit from 0.46.0 to 0.49.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.46.0 to 0.49.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.46.0...v0.49.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-08 08:59:30 +00:00
128779fed7 Merge pull request #1283 from crazy-max/named-context-handlebars
handlebar defaultContext support for build-contexts input
2025-01-08 09:57:16 +01:00
7e094594be Merge pull request #1282 from crazy-max/remove-buildkit-5561
Revert "init buildkit-5561 workflow"
2024-12-17 16:32:34 +01:00
32ee877a58 Revert "init buildkit-5561 workflow"
This reverts commit f5a8591a7f.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-12-17 16:26:04 +01:00
d1a4129c41 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-12-17 16:25:57 +01:00
49c623eaf8 handlebar defaultContext support for build-contexts input
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-12-17 16:25:56 +01:00
bcc9f4afe7 Merge pull request #1284 from crazy-max/dockerfiles-pin-bases
test: fix multi-sudo dockerfile
2024-12-17 16:18:44 +01:00
da5b6c75b9 test: fix multi-sudo dockerfile
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-12-17 16:12:32 +01:00
11be14d908 Merge pull request #1274 from crazy-max/init-buildkit-5561
init buildkit-5561 workflow
2024-12-05 15:27:22 +01:00
f5a8591a7f init buildkit-5561 workflow
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-12-05 15:21:59 +01:00
8796455d32 Merge pull request #1272 from crazy-max/update-readme
readme: move login step up
2024-12-03 16:04:51 +01:00
750f367828 readme: move login step up
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-12-03 15:36:12 +01:00
48aba3b46d Merge pull request #1268 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.46.0
chore(deps): Bump @docker/actions-toolkit from 0.39.0 to 0.46.0
2024-11-26 11:20:57 +01:00
678328cf8e chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-26 11:17:24 +01:00
cdf0a37e6f chore(deps): Bump @docker/actions-toolkit from 0.39.0 to 0.46.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.39.0 to 0.46.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.39.0...v0.46.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-26 10:16:04 +00:00
d719b79de1 Merge pull request #1238 from docker/dependabot/npm_and_yarn/actions/core-1.11.1
chore(deps): Bump @actions/core from 1.10.1 to 1.11.1
2024-11-26 11:14:18 +01:00
c333dfd43d chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-26 11:12:04 +01:00
6b56a4c3f8 chore(deps): Bump @actions/core from 1.10.1 to 1.11.1
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.10.1 to 1.11.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-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-26 10:01:50 +00:00
92fb0d73b6 Merge pull request #1259 from docker/dependabot/github_actions/codecov/codecov-action-5
chore(deps): Bump codecov/codecov-action from 4 to 5
2024-11-26 10:59:59 +01:00
40532c5d6f ci: fix deprecated input for codecov-action
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-26 10:56:40 +01:00
70dd953427 Merge pull request #1267 from crazy-max/fix-allow
iterate over allow input values and push each separately
2024-11-26 10:54:57 +01:00
41b4e8020e Merge pull request #1261 from docker/dependabot/npm_and_yarn/cross-spawn-7.0.6
chore(deps): Bump cross-spawn from 7.0.3 to 7.0.6
2024-11-26 10:54:24 +01:00
22cd91d73b Merge pull request #1266 from crazy-max/update-trbsht
update troubleshooting markdown
2024-11-26 10:14:48 +01:00
6bdcc4fb8c chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-26 01:30:39 +01:00
b5e932e401 iterate over allow input values and push each separately
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-26 01:30:38 +01:00
325a8bf0f1 update troubleshooting markdown
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-26 01:12:56 +01:00
0259cb088b Merge pull request #1265 from crazy-max/call-check
call input to set method for evaluating build
2024-11-25 14:51:52 -05:00
1b8e4efb78 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-25 18:38:40 +01:00
75ffdcce88 call input to set method for evaluating build
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-25 18:37:45 +01:00
73b7dbf5d4 chore(deps): Bump cross-spawn from 7.0.3 to 7.0.6
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18 22:35:50 +00:00
f79ca49284 chore(deps): Bump codecov/codecov-action from 4 to 5
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [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/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-15 11:05:57 +00:00
5e99dacf67 Merge pull request #1245 from crazy-max/publish-immutable-action
ci: publish as immutable action workflow
2024-10-26 00:40:44 +02:00
b249570060 ci: publish as immutable action workflow
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-10-25 13:18:56 +02:00
4f58ea7922 Merge pull request #1234 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.39.0
chore(deps): Bump @docker/actions-toolkit from 0.38.0 to 0.39.0
2024-09-30 11:50:59 +02:00
49b5ea61c6 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-09-30 11:40:00 +02:00
13c9fddd72 chore(deps): Bump @docker/actions-toolkit from 0.38.0 to 0.39.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.38.0 to 0.39.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.38.0...v0.39.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-30 09:34:56 +00:00
e44afff359 Merge pull request #1232 from docker/dependabot/npm_and_yarn/path-to-regexp-6.3.0
chore(deps): Bump path-to-regexp from 6.2.2 to 6.3.0
2024-09-27 14:21:12 +02:00
67ebad331f chore(deps): Bump path-to-regexp from 6.2.2 to 6.3.0
Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) from 6.2.2 to 6.3.0.
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](https://github.com/pillarjs/path-to-regexp/compare/v6.2.2...v6.3.0)

---
updated-dependencies:
- dependency-name: path-to-regexp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-27 11:38:59 +00:00
32945a3392 Merge pull request #1230 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.38.0
chore(deps): Bump @docker/actions-toolkit from 0.37.1 to 0.38.0
2024-09-27 13:36:58 +02:00
e0fe9cf0f2 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-09-27 13:34:05 +02:00
8f1ff6bf9a chore(deps): Bump @docker/actions-toolkit from 0.37.1 to 0.38.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.37.1 to 0.38.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.37.1...v0.38.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-27 10:57:29 +00:00
5cd11c3a4c Merge pull request #1211 from crazy-max/summary-info-message
print info message for build summary support checks
2024-08-13 12:33:34 +02:00
0aba704831 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-08-13 11:18:29 +02:00
23c657a01f print info message for build summary support checks
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-08-13 11:05:41 +02:00
16ebe778df Merge pull request #1205 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.37.1
chore(deps): Bump @docker/actions-toolkit from 0.37.0 to 0.37.1
2024-08-07 22:17:02 +02:00
646a62b4f2 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-08-07 22:13:02 +02:00
d92ab1347f chore(deps): Bump @docker/actions-toolkit from 0.37.0 to 0.37.1
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.37.0 to 0.37.1.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.37.0...v0.37.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-07 20:11:38 +00:00
4f7cdeb0f0 Merge pull request #1198 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.37.0
chore(deps): Bump @docker/actions-toolkit from 0.36.0 to 0.37.0
2024-08-07 10:02:48 +02:00
ad3cd774a4 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-08-07 09:52:34 +02:00
3efbc13366 chore(deps): Bump @docker/actions-toolkit from 0.36.0 to 0.37.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.36.0 to 0.37.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.36.0...v0.37.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-07 07:50:48 +00:00
2dbe91db48 Merge pull request #1197 from crazy-max/build-checks
generate GitHub annotations for build checks
2024-08-06 17:08:37 +02:00
7de3854c4c chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-31 14:16:51 +02:00
175aa53a3f opt to disable github annotations generation for build checks
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-31 14:01:00 +02:00
806a2a461f generate GitHub annotations for build checks
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-30 17:57:28 +02:00
a8d35412fb Merge pull request #1196 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.36.0
chore(deps): Bump @docker/actions-toolkit from 0.35.0 to 0.36.0
2024-07-30 16:33:04 +02:00
1672e74297 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-30 16:24:19 +02:00
a04f51d3b4 chore(deps): Bump @docker/actions-toolkit from 0.35.0 to 0.36.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.35.0 to 0.36.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.35.0...v0.36.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-30 14:12:41 +00:00
5176d81f87 Merge pull request #1191 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.35.0
chore(deps): Bump @docker/actions-toolkit from 0.34.0 to 0.35.0
2024-07-22 11:57:03 +02:00
ec10ae8f96 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-22 11:54:59 +02:00
597e8fc414 chore(deps): Bump @docker/actions-toolkit from 0.34.0 to 0.35.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.34.0 to 0.35.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.34.0...v0.35.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-22 09:44:56 +00:00
e050dfa622 Merge pull request #1186 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.34.0
chore(deps): Bump @docker/actions-toolkit from 0.33.0 to 0.34.0
2024-07-19 13:10:25 +02:00
d1fcdb6ee0 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-18 16:55:34 +02:00
a6067b9a1a chore(deps): Bump @docker/actions-toolkit from 0.33.0 to 0.34.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.33.0 to 0.34.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.33.0...v0.34.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-18 11:36:14 +00:00
1ca370b3a9 Merge pull request #1183 from crazy-max/revert-gha-cache-to
revert "set repository and ghtoken attributes for gha cache type"
2024-07-17 11:01:30 +02:00
2c95ebed5c chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-17 10:48:34 +02:00
d189d0ef33 Revert "set repository and ghtoken attributes for gha cache type"
This reverts commit 522345f555.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-17 10:47:38 +02:00
a254f8ca60 Merge pull request #1179 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.33.0
chore(deps): Bump @docker/actions-toolkit from 0.31.0 to 0.33.0
2024-07-15 13:54:32 +02:00
94dae62c78 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-15 13:51:58 +02:00
267a69d6cc chore(deps): Bump @docker/actions-toolkit from 0.31.0 to 0.33.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.31.0 to 0.33.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.31.0...v0.33.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-15 11:50:08 +00:00
f23fb2a7cb Merge pull request #1133 from crazy-max/gha-cache-to
set repository and ghtoken attributes for gha cache type
2024-07-15 13:47:10 +02:00
ef76d100ee chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-03 10:03:37 +02:00
522345f555 set repository and ghtoken attributes for gha cache type
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-03 10:02:24 +02:00
1a162644f9 Merge pull request #1172 from crazy-max/build-export-disable
opt to disable build record upload
2024-07-02 18:38:46 +02:00
9eea548195 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-02 18:19:48 +02:00
11c2faaa9e rename DOCKER_BUILD_EXPORT_RETENTION_DAYS to DOCKER_BUILD_RECORD_RETENTION_DAYS
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-02 18:13:41 +02:00
de2365af33 opt to disable build record upload
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-02 18:07:54 +02:00
bca5082da7 Merge pull request #1173 from crazy-max/build-summary-env-change
switch DOCKER_BUILD_SUMMARY_DISABLE to DOCKER_BUILD_SUMMARY
2024-07-02 17:59:43 +02:00
e7aab408d9 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-02 17:55:45 +02:00
63eb7590c6 switch DOCKER_BUILD_SUMMARY_DISABLE to DOCKER_BUILD_SUMMARY
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-02 17:55:44 +02:00
53ec48606f Merge pull request #1171 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.31.0
chore(deps): Bump @docker/actions-toolkit from 0.30.0 to 0.31.0
2024-07-02 15:28:50 +02:00
fe9d9f1d0c chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-02 15:26:29 +02:00
ad37ba1ad0 chore(deps): Bump @docker/actions-toolkit from 0.30.0 to 0.31.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.30.0 to 0.31.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.30.0...v0.31.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 13:25:11 +00:00
aabbd3f4d7 Merge pull request #1170 from crazy-max/rename-summary-disable
rename DOCKER_BUILD_NO_SUMMARY to DOCKER_BUILD_SUMMARY_DISABLE
2024-07-02 15:11:52 +02:00
9c7c277413 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-02 14:50:21 +02:00
987902144c rename DOCKER_BUILD_NO_SUMMARY to DOCKER_BUILD_SUMMARY_DISABLE
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-02 14:49:31 +02:00
709dde20a7 Merge pull request #1160 from crazy-max/check-summary-support
move summary support check right after build
2024-07-02 14:28:05 +02:00
ec2d640ea6 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-02 14:22:01 +02:00
3dc0757c66 move summary support check right after build
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-02 14:20:56 +02:00
dcb0699155 Merge pull request #1169 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.30.0
chore(deps): Bump @docker/actions-toolkit from 0.29.0 to 0.30.0
2024-07-02 14:16:55 +02:00
a3c06e8698 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-02 14:14:03 +02:00
e75138d857 chore(deps): Bump @docker/actions-toolkit from 0.29.0 to 0.30.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.29.0 to 0.30.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.29.0...v0.30.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 12:03:13 +00:00
9552610e81 Merge pull request #1166 from crazy-max/subdir-supported
docs: subdir for git context supported since Docker 23
2024-07-01 13:43:50 +02:00
99c83871c1 docs: subdir for git context supported since Docker 23
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-01 00:54:10 +02:00
af64c4e18f Merge pull request #1161 from docker/readme-summaries
readme: add section on job summaries
2024-06-27 14:15:15 +02:00
6fdff4fb09 readme: add section on job summaries
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-06-27 13:51:35 +02:00
9e59c61762 Merge pull request #1159 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.29.0
chore(deps): Bump @docker/actions-toolkit from 0.28.0 to 0.29.0
2024-06-27 11:11:05 +02:00
49351df2b7 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-06-27 11:08:00 +02:00
723ff6ffad chore(deps): Bump @docker/actions-toolkit from 0.28.0 to 0.29.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.28.0 to 0.29.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.28.0...v0.29.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-27 09:03:36 +00:00
15560696de Merge pull request #1158 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.28.0
chore(deps): Bump @docker/actions-toolkit from 0.27.0 to 0.28.0
2024-06-26 14:20:37 +02:00
57e1d34ac3 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-06-26 14:14:54 +02:00
309982ebc9 chore(deps): Bump @docker/actions-toolkit from 0.27.0 to 0.28.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.27.0 to 0.28.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.27.0...v0.28.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-26 12:10:23 +00:00
9476c25b2a Merge pull request #1153 from crazy-max/export-retention
use default retention days for build export artifact
2024-06-26 14:00:48 +02:00
97be5a4928 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-06-24 10:28:21 +02:00
9cac6c8ea0 use default retention days for build export artifact
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-06-24 10:28:21 +02:00
31159d49c0 Merge pull request #1149 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.27.0
chore(deps): Bump @docker/actions-toolkit from 0.26.2 to 0.27.0
2024-06-20 19:22:45 +02:00
07e1c3e148 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-06-20 19:18:43 +02:00
f7febd621d chore(deps): Bump @docker/actions-toolkit from 0.26.2 to 0.27.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.26.2 to 0.27.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.26.2...v0.27.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-20 17:13:56 +00:00
f6010ea701 Merge pull request #1147 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.26.2
chore(deps): Bump @docker/actions-toolkit from 0.26.1 to 0.26.2
2024-06-20 15:56:23 +02:00
c0a6b9680f chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-06-20 14:56:13 +02:00
0dfe9c3d41 chore(deps): Bump @docker/actions-toolkit from 0.26.1 to 0.26.2
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.26.1 to 0.26.2.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.26.1...v0.26.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-20 11:15:38 +00:00
94f8f8c2ee Merge pull request #1142 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.26.1
chore(deps): Bump @docker/actions-toolkit from 0.26.0 to 0.26.1
2024-06-18 17:39:29 +02:00
22f4433c58 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-06-18 17:37:35 +02:00
6721c56015 chore(deps): Bump @docker/actions-toolkit from 0.26.0 to 0.26.1
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.26.0 to 0.26.1.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.26.0...v0.26.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-18 15:33:20 +00:00
4367da978b Merge pull request #1140 from docker/dependabot/github_actions/docker/bake-action-5
chore(deps): Bump docker/bake-action from 4 to 5
2024-06-17 13:17:16 +02:00
0883ebe52d Merge pull request #1139 from crazy-max/bump-major
docs: bump actions to latest major
2024-06-17 13:16:55 +02:00
76e5c2d6ea chore(deps): Bump docker/bake-action from 4 to 5
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 4 to 5.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-17 11:08:17 +00:00
29d67824d8 docs: bump actions to latest major
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-06-17 11:46:56 +02:00
c382f710d3 Merge pull request #1120 from crazy-max/build-summary
export build record and generate summary
2024-06-17 09:23:45 +02:00
5a5b70d974 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-06-14 16:11:49 +02:00
dc24cf9e25 don't generate summary for cloud driver
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-06-14 16:06:09 +02:00
667cb22c52 DOCKER_BUILD_NO_SUMMARY env to disable summary
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-06-14 16:06:09 +02:00
d880b1964b generate build summary
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-06-14 16:06:08 +02:00
e51051ad0b export build record and upload artifact
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-06-14 16:06:08 +02:00
86c2bd0031 Merge pull request #1137 from docker/dependabot/npm_and_yarn/braces-3.0.3
chore(deps): Bump braces from 3.0.2 to 3.0.3
2024-06-14 16:05:47 +02:00
268d2b1611 Merge pull request #1138 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.26.0
chore(deps): Bump @docker/actions-toolkit from 0.25.1 to 0.26.0
2024-06-14 16:02:14 +02:00
2b8dc7f529 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-06-14 15:59:52 +02:00
840c12be17 chore(deps): Bump @docker/actions-toolkit from 0.25.1 to 0.26.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.25.1 to 0.26.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.25.1...v0.26.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-14 13:55:22 +00:00
26368743c0 chore(deps): Bump braces from 3.0.2 to 3.0.3
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-12 07:44:48 +00:00
cfed4e995e Merge pull request #1136 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.25.1
chore(deps): Bump @docker/actions-toolkit from 0.25.0 to 0.25.1
2024-06-12 09:42:53 +02:00
dca03ca8fd chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-06-12 09:38:12 +02:00
e030091ff4 chore(deps): Bump @docker/actions-toolkit from 0.25.0 to 0.25.1
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.25.0 to 0.25.1.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.25.0...v0.25.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-12 07:34:37 +00:00
84354d3b32 Merge pull request #1132 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.25.0
chore(deps): Bump @docker/actions-toolkit from 0.24.0 to 0.25.0
2024-06-10 15:14:08 +02:00
de5408fe94 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-06-10 15:12:15 +02:00
cfc1555281 fix tests after changes with provenance builder-id
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-06-10 15:06:45 +02:00
f6a172d30e chore(deps): Bump @docker/actions-toolkit from 0.24.0 to 0.25.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.24.0 to 0.25.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.24.0...v0.25.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-10 12:56:13 +00:00
ca052bb54a Merge pull request #1128 from crazy-max/builder-info
show builder information before building
2024-05-29 14:20:19 +02:00
025c2051f3 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-05-29 12:53:55 +02:00
12076d2fb1 show builder information before building
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-05-29 12:52:50 +02:00
ef6cba3353 Merge pull request #1127 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.24.0
chore(deps): Bump @docker/actions-toolkit from 0.23.0 to 0.24.0
2024-05-27 12:51:04 +02:00
4c16cf906a chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-05-27 12:48:55 +02:00
a3118a86c8 fixes since moved types
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-05-27 12:45:25 +02:00
c86eb8b0f7 chore(deps): Bump @docker/actions-toolkit from 0.23.0 to 0.24.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.23.0 to 0.24.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.23.0...v0.24.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-27 10:44:02 +00:00
2a53c6ccda Merge pull request #1122 from crazy-max/update-dev-deps
chore: update dev dependencies
2024-05-15 13:47:05 +02:00
ccef1f210d chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-05-15 13:44:48 +02:00
79117b6ea5 chore: update dev dependencies
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-05-15 13:41:47 +02:00
df19a799eb Merge pull request #1121 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.23.0
chore(deps): Bump @docker/actions-toolkit from 0.22.0 to 0.23.0
2024-05-14 14:34:37 +02:00
0e2ab16cd2 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-05-14 14:32:09 +02:00
54d0f58d64 fixes related to actions-toolkit 0.23.0 changes
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-05-14 14:11:32 +02:00
563a2f55e4 chore(deps): Bump @docker/actions-toolkit from 0.22.0 to 0.23.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.22.0 to 0.23.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.22.0...v0.23.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-14 11:51:36 +00:00
6003d3266a Merge pull request #1115 from crazy-max/fix-e2e-artifactory
ci(e2e): fix artifactory slug
2024-05-10 10:21:37 +02:00
e1e22cdde8 ci(e2e): fix artifactory slug
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-05-10 10:19:21 +02:00
fc15b64049 Merge pull request #1114 from crazy-max/e2e-artifactory
ci(e2e): update artifactory instance
2024-05-10 10:15:01 +02:00
6c58ea3670 ci(e2e): update artifactory instance
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-05-10 09:56:42 +02:00
729f7f4926 Merge pull request #1109 from crazy-max/align-inputs-iface
align interface fields with action inputs
2024-05-06 12:18:15 +02:00
99d83235bc chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-05-06 12:11:32 +02:00
1d5307d7af align interface fields with action inputs
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-05-06 12:08:12 +02:00
cf8d130912 Merge pull request #1110 from crazy-max/update-yarn
update to yarn 3.6.3
2024-05-06 12:07:31 +02:00
8804d8e2ac chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-05-06 12:02:50 +02:00
1984549052 chore: add plugin-interactive-tools yarn pkg
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-05-06 12:01:44 +02:00
5bc9e2e9b9 update to yarn 3.6.3
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-05-06 12:01:20 +02:00
eb539f44b1 Merge pull request #1090 from docker/dependabot/npm_and_yarn/undici-5.28.4
chore(deps): Bump undici from 5.28.3 to 5.28.4
2024-04-26 13:42:42 +02:00
b6ff9e5753 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-04-26 13:06:55 +02:00
929fba6cce chore(deps): Bump undici from 5.28.3 to 5.28.4
Bumps [undici](https://github.com/nodejs/undici) from 5.28.3 to 5.28.4.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.3...v5.28.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-26 10:59:25 +00:00
7f1f43ba33 Merge pull request #1105 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.22.0
chore(deps): Bump @docker/actions-toolkit from 0.20.0 to 0.22.0
2024-04-26 12:22:27 +02:00
40d6a900e0 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-04-26 11:54:16 +02:00
d56be63626 Merge pull request #1106 from crazy-max/docs-rm-stubs
docs: remove stub files
2024-04-26 11:21:16 +02:00
eb3cfeaf00 switch to new Build class
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-04-26 11:20:49 +02:00
d0fc12d8a4 docs: remove stub files
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-04-26 11:12:45 +02:00
68615d5b67 chore(deps): Bump @docker/actions-toolkit from 0.20.0 to 0.22.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.20.0 to 0.22.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.20.0...v0.22.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-26 09:09:12 +00:00
c3b570184c Merge pull request #1086 from crazy-max/fix-attests-provenance-sbom
handle attests correctly with provenance and sbom inputs
2024-04-26 11:05:55 +02:00
7e6f77677b Merge pull request #1095 from crazy-max/ci-use-stable-1
ci: switch to stable buildkit image for load and push
2024-04-16 08:47:52 +02:00
2ce6beaad4 readme: update following latest buildx/buildkit releases
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-04-15 09:50:33 +02:00
4c8d1e6826 ci: switch to stable buildkit image for load and push
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-04-15 09:47:50 +02:00
b0312962ef chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-04-02 10:58:32 +02:00
96acf63e4c handle attests correctly with provenance and sbom inputs
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-04-02 10:54:20 +02:00
f8bc7f4600 Merge pull request #1088 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.20.0
chore(deps): Bump @docker/actions-toolkit from 0.19.0 to 0.20.0
2024-04-02 10:47:32 +02:00
c2064be02c chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-04-02 10:43:15 +02:00
4f02f34098 chore(deps): Bump @docker/actions-toolkit from 0.19.0 to 0.20.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.19.0 to 0.20.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.19.0...v0.20.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-02 08:41:33 +00:00
090ca155fc Merge pull request #1081 from crazy-max/ci-update-bk-config
ci: use buildkitd-config input
2024-03-18 09:33:18 +01:00
ec4854f780 ci: use buildkitd-config input
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-03-17 18:33:27 +01:00
2cdde995de Merge pull request #1080 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.19.0
chore(deps): Bump @docker/actions-toolkit from 0.18.0 to 0.19.0
2024-03-13 19:21:45 +01:00
008747aa03 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-03-13 19:19:46 +01:00
1580753126 chore(deps): Bump @docker/actions-toolkit from 0.18.0 to 0.19.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.18.0 to 0.19.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.18.0...v0.19.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-13 18:18:15 +00:00
2a7db1d68a Merge pull request #1075 from crazy-max/ci-multi-output
ci: test multi output
2024-03-11 16:57:53 -07:00
35e7dd5921 ci: test multi output
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-03-08 14:07:12 +01:00
af5a7ed5ba Merge pull request #1074 from crazy-max/build-cmd-debug
disable quotes detection for "outputs" input
2024-03-07 19:54:57 +01:00
2a85189a6c chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-03-06 15:26:36 +01:00
6c2079483e disable quotes detection for "outputs" input
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-03-06 15:25:57 +01:00
afdf0c0a67 chore: debug build cmd and args
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-03-06 15:20:53 +01:00
00ae31ab6e Merge pull request #1070 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.18.0
chore(deps): Bump @docker/actions-toolkit from 0.14.0 to 0.18.0
2024-03-06 14:43:50 +01:00
701942b6e5 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-03-06 14:40:26 +01:00
90e54d0b1d chore(deps): Bump @docker/actions-toolkit from 0.14.0 to 0.18.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.14.0 to 0.18.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.14.0...v0.18.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-01 11:36:46 +00:00
831ca179d3 Merge pull request #1066 from crazy-max/ci-local-cache
ci: local-cache job to test local cache feature
2024-02-29 13:00:40 +01:00
6bd0e5492f ci: local-cache job to test local cache feature
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-02-28 15:47:13 +01:00
b3eddbb94c Merge pull request #1057 from docker/dependabot/npm_and_yarn/undici-5.28.3
chore(deps): Bump undici from 5.26.3 to 5.28.3
2024-02-23 09:32:22 +01:00
ffd798c1f1 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-02-23 09:30:57 +01:00
62d8db0960 Merge pull request #1059 from crazy-max/codecov-token
ci: set codecov token
2024-02-22 23:31:08 +01:00
8ab81cb898 ci: set codecov token
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-02-22 23:27:38 +01:00
d47e7c357d chore(deps): Bump undici from 5.26.3 to 5.28.3
Bumps [undici](https://github.com/nodejs/undici) from 5.26.3 to 5.28.3.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.26.3...v5.28.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-16 17:55:24 +00:00
4976231911 Merge pull request #1046 from docker/dependabot/github_actions/codecov/codecov-action-4
chore(deps): Bump codecov/codecov-action from 3 to 4
2024-02-03 15:27:24 +01:00
d236adc992 chore(deps): Bump codecov/codecov-action from 3 to 4
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [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/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-01 11:49:00 +00:00
94d76d3bc1 Merge pull request #1041 from k-yamasaki-zakisan/feature/upgrate-readme-to-actions/checkout@v4
upgrade actions/checkout to v4
2024-01-26 10:41:26 +01:00
2b28f2a854 upgrade actions/checkout to v4
Signed-off-by: Kazuyoshi Yamasaki <kazuyoshi.kyushu@gmail.com>
2024-01-26 17:18:20 +09:00
9f6f8c940b Merge pull request #1019 from favonia/warn-about-ignored-inputs
feat: warn about ignored inputs
2023-12-01 09:31:23 -08:00
8411d080ee feat: warn about ignored inputs
Currently, several inputs can be silently ignored without
any warnings. This change will issue a warning for each
ignored input with a short explanation.

Signed-off-by: favonia <favonia@gmail.com>
2023-12-01 07:50:51 -06:00
44 changed files with 10678 additions and 4688 deletions

View File

@ -1,2 +1,12 @@
/coverage /coverage
/node_modules
# Dependency directories
node_modules/
jspm_packages/
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

View File

@ -13,7 +13,7 @@
], ],
"parser": "@typescript-eslint/parser", "parser": "@typescript-eslint/parser",
"parserOptions": { "parserOptions": {
"ecmaVersion": "latest", "ecmaVersion": 2023,
"sourceType": "module" "sourceType": "module"
}, },
"plugins": [ "plugins": [

2
.gitattributes vendored
View File

@ -1,2 +1,4 @@
/.yarn/releases/** binary
/.yarn/plugins/** binary
/dist/** linguist-generated=true /dist/** linguist-generated=true
/lib/** linguist-generated=true /lib/** linguist-generated=true

BIN
.github/build-push-summary.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

View File

@ -38,6 +38,9 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
-
buildx_version: edge
buildkit_image: moby/buildkit:latest
- -
buildx_version: latest buildx_version: latest
buildkit_image: moby/buildkit:buildx-stable-1 buildkit_image: moby/buildkit:buildx-stable-1
@ -65,10 +68,11 @@ jobs:
if: inputs.type == 'local' if: inputs.type == 'local'
run: | run: |
if [ ! -e /etc/docker/daemon.json ]; then if [ ! -e /etc/docker/daemon.json ]; then
echo '{}' | tee /etc/docker/daemon.json >/dev/null echo '{}' | sudo tee /etc/docker/daemon.json >/dev/null
fi fi
DOCKERD_CONFIG=$(jq '.+{"insecure-registries":["http://${{ env.REGISTRY_FQDN }}"]}' /etc/docker/daemon.json) DOCKERD_CONFIG=$(jq '.+{"insecure-registries":["http://${{ env.REGISTRY_FQDN }}"]}' /etc/docker/daemon.json)
sudo tee /etc/docker/daemon.json <<<"$DOCKERD_CONFIG" >/dev/null sudo tee /etc/docker/daemon.json <<<"$DOCKERD_CONFIG" >/dev/null
cat /etc/docker/daemon.json
sudo service docker restart sudo service docker restart
- -
name: Install ${{ inputs.name }} name: Install ${{ inputs.name }}
@ -94,7 +98,7 @@ jobs:
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
with: with:
version: ${{ matrix.buildx_version }} version: ${{ matrix.buildx_version }}
config: /tmp/buildkitd.toml buildkitd-config: /tmp/buildkitd.toml
buildkitd-flags: --debug --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host buildkitd-flags: --debug --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host
driver-opts: | driver-opts: |
image=${{ matrix.buildkit_image }} image=${{ matrix.buildkit_image }}

View File

@ -24,8 +24,8 @@ on:
pull_request: pull_request:
env: env:
BUILDX_VERSION: latest BUILDX_VERSION: edge
BUILDKIT_IMAGE: moby/buildkit:buildx-stable-1 BUILDKIT_IMAGE: moby/buildkit:latest
jobs: jobs:
minimal: minimal:
@ -288,7 +288,6 @@ jobs:
- -
name: Check name: Check
run: | run: |
echo "${{ toJson(steps.docker_build) }}"
if [ "${{ steps.docker_build.outcome }}" != "failure" ] || [ "${{ steps.docker_build.conclusion }}" != "success" ]; then if [ "${{ steps.docker_build.outcome }}" != "failure" ] || [ "${{ steps.docker_build.conclusion }}" != "success" ]; then
echo "::error::Should have failed" echo "::error::Should have failed"
exit 1 exit 1
@ -324,7 +323,6 @@ jobs:
- -
name: Check name: Check
run: | run: |
echo "${{ toJson(steps.docker_build) }}"
if [ "${{ steps.docker_build.outcome }}" != "failure" ] || [ "${{ steps.docker_build.conclusion }}" != "success" ]; then if [ "${{ steps.docker_build.outcome }}" != "failure" ] || [ "${{ steps.docker_build.conclusion }}" != "success" ]; then
echo "::error::Should have failed" echo "::error::Should have failed"
exit 1 exit 1
@ -567,6 +565,8 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- buildx: edge
buildkit: moby/buildkit:latest
- buildx: latest - buildx: latest
buildkit: moby/buildkit:buildx-stable-1 buildkit: moby/buildkit:buildx-stable-1
- buildx: latest - buildx: latest
@ -942,6 +942,63 @@ jobs:
run: | run: |
docker buildx imagetools inspect localhost:5000/name/app:1.0.0 --format '{{json .}}' docker buildx imagetools inspect localhost:5000/name/app:1.0.0 --format '{{json .}}'
local-cache:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
network=host
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
buildkitd-flags: --debug
-
name: Cache Build
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-local-test-${{ github.sha }}
restore-keys: |
${{ runner.os }}-local-test-
-
name: Build and push
uses: ./
with:
context: ./test
file: ./test/multi.Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
localhost:5000/name/app:latest
localhost:5000/name/app:1.0.0
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
-
name: Inspect
run: |
docker buildx imagetools inspect localhost:5000/name/app:1.0.0 --format '{{json .}}'
-
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
standalone: standalone:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -1197,3 +1254,343 @@ jobs:
name: Check manifest name: Check manifest
run: | run: |
docker buildx imagetools inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }} --format '{{json .}}' docker buildx imagetools inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }} --format '{{json .}}'
multi-output:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
network=host
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
buildkitd-flags: --debug
-
name: Build
uses: ./
with:
context: ./test
file: ./test/Dockerfile
outputs: |
type=image,name=localhost:5000/name/app:latest,push=true
type=docker,name=app:local
type=oci,dest=/tmp/oci.tar
-
name: Check registry
run: |
docker buildx imagetools inspect localhost:5000/name/app:latest --format '{{json .}}'
-
name: Check docker
run: |
docker image inspect app:local
-
name: Check oci
run: |
set -ex
mkdir -p /tmp/oci-out
tar xf /tmp/oci.tar -C /tmp/oci-out
tree -nh /tmp/oci-out
load-and-push:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
network=host
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
buildkitd-flags: --debug
-
name: Build
uses: ./
with:
context: ./test
file: ./test/Dockerfile
load: true
push: true
tags: localhost:5000/name/app:latest
-
name: Check registry
run: |
docker buildx imagetools inspect localhost:5000/name/app:latest --format '{{json .}}'
-
name: Check docker
run: |
docker image inspect localhost:5000/name/app:latest
summary-disable:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
path: action
-
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: ./action
with:
file: ./test/Dockerfile
env:
DOCKER_BUILD_SUMMARY: false
summary-disable-deprecated:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
path: action
-
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: ./action
with:
file: ./test/Dockerfile
env:
DOCKER_BUILD_NO_SUMMARY: true
summary-not-supported:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
path: action
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: v0.12.1
driver-opts: |
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build
uses: ./action
with:
file: ./test/Dockerfile
record-upload-disable:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
path: action
-
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: ./action
with:
file: ./test/Dockerfile
env:
DOCKER_BUILD_RECORD_UPLOAD: false
record-retention-days:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
days:
- 2
- 0
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
path: action
-
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: ./action
with:
file: ./test/Dockerfile
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
with:
path: action
-
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: ./action
with:
file: ./test/Dockerfile
env:
DOCKER_BUILD_EXPORT_LEGACY: ${{ matrix.legacy }}
checks:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
buildx-version:
- edge
- latest
- v0.14.1
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: ${{ matrix.buildx-version }}
driver-opts: |
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build
uses: ./
with:
context: ./test
file: ./test/lint.Dockerfile
annotations-disabled:
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:
context: ./test
file: ./test/lint.Dockerfile
env:
DOCKER_BUILD_CHECKS_ANNOTATIONS: false
call-check:
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
id: docker_build
continue-on-error: true
uses: ./
with:
context: ./test
file: ./test/lint.Dockerfile
call: check
-
name: Check
run: |
if [ "${{ steps.docker_build.outcome }}" != "failure" ] || [ "${{ steps.docker_build.conclusion }}" != "success" ]; then
echo "::error::Should have failed"
exit 1
fi
no-default-attestations:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
path: action
-
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: ./action
with:
file: ./test/Dockerfile
env:
BUILDX_NO_DEFAULT_ATTESTATIONS: 1

View File

@ -67,13 +67,6 @@ jobs:
username_secret: GAR_USERNAME username_secret: GAR_USERNAME
password_secret: GAR_JSON_KEY password_secret: GAR_JSON_KEY
type: remote type: remote
-
name: Google Container Registry
registry: gcr.io
slug: gcr.io/sandbox-298914/test-docker-action
username_secret: GCR_USERNAME
password_secret: GCR_JSON_KEY
type: remote
- -
name: Azure Container Registry name: Azure Container Registry
registry: officialgithubactions.azurecr.io registry: officialgithubactions.azurecr.io
@ -88,13 +81,13 @@ jobs:
username_secret: QUAY_USERNAME username_secret: QUAY_USERNAME
password_secret: QUAY_TOKEN password_secret: QUAY_TOKEN
type: remote type: remote
# - -
# name: Artifactory name: Artifactory
# registry: sforzando-build-team-local.jfrog.io registry: infradock.jfrog.io
# slug: sforzando-build-team-local.jfrog.io/build-push-action-e2e slug: infradock.jfrog.io/test-ghaction/build-push-action
# username_secret: ARTIFACTORY_USERNAME username_secret: ARTIFACTORY_USERNAME
# password_secret: ARTIFACTORY_TOKEN password_secret: ARTIFACTORY_TOKEN
# type: remote type: remote
- -
name: Harbor name: Harbor
id: harbor id: harbor

17
.github/workflows/pr-assign-author.yml vendored Normal file
View File

@ -0,0 +1,17 @@
name: pr-assign-author
permissions:
contents: read
on:
pull_request_target:
types:
- opened
- reopened
jobs:
run:
uses: crazy-max/.github/.github/workflows/pr-assign-author.yml@1b673f36fad86812f538c1df9794904038a23cbf
permissions:
contents: read
pull-requests: write

21
.github/workflows/publish.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: publish
on:
release:
types:
- published
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
packages: write
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Publish
uses: actions/publish-immutable-action@v0.0.4

View File

@ -20,11 +20,13 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- -
name: Test name: Test
uses: docker/bake-action@v4 uses: docker/bake-action@v6
with: with:
source: .
targets: test targets: test
- -
name: Upload coverage name: Upload coverage
uses: codecov/codecov-action@v3 uses: codecov/codecov-action@v5
with: with:
file: ./coverage/clover.xml files: ./coverage/clover.xml
token: ${{ secrets.CODECOV_TOKEN }}

View File

@ -15,16 +15,17 @@ jobs:
prepare: prepare:
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
targets: ${{ steps.targets.outputs.matrix }} targets: ${{ steps.generate.outputs.targets }}
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- -
name: Targets matrix name: List targets
id: targets id: generate
run: | uses: docker/bake-action/subaction/list-targets@v6
echo "matrix=$(docker buildx bake validate --print | jq -cr '.group.validate.targets')" >> $GITHUB_OUTPUT with:
target: validate
validate: validate:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -35,11 +36,8 @@ jobs:
matrix: matrix:
target: ${{ fromJson(needs.prepare.outputs.targets) }} target: ${{ fromJson(needs.prepare.outputs.targets) }}
steps: steps:
-
name: Checkout
uses: actions/checkout@v4
- -
name: Validate name: Validate
uses: docker/bake-action@v4 uses: docker/bake-action@v6
with: with:
targets: ${{ matrix.target }} targets: ${{ matrix.target }}

66
.gitignore vendored
View File

@ -1,7 +1,5 @@
node_modules # https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore
lib
# Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
# Logs # Logs
logs logs
*.log *.log
@ -9,6 +7,7 @@ npm-debug.log*
yarn-debug.log* yarn-debug.log*
yarn-error.log* yarn-error.log*
lerna-debug.log* lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html) # Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
@ -19,34 +18,14 @@ pids
*.seed *.seed
*.pid.lock *.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul # Coverage directory used by tools like istanbul
coverage coverage
*.lcov *.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories # Dependency directories
node_modules/
jspm_packages/ jspm_packages/
# TypeScript v1 declaration files
typings/
# TypeScript cache # TypeScript cache
*.tsbuildinfo *.tsbuildinfo
@ -56,36 +35,19 @@ typings/
# Optional eslint cache # Optional eslint cache
.eslintcache .eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file # Yarn Integrity file
.yarn-integrity .yarn-integrity
# dotenv environment variables file # dotenv environment variable files
.env .env
.env.test .env.development.local
.env.test.local
.env.production.local
.env.local
# parcel-bundler cache (https://parceljs.org/) # yarn v2
.cache .yarn/cache
.yarn/unplugged
# next.js build output .yarn/build-state.yml
.next .yarn/install-state.gz
.pnp.*
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/

6
.prettierignore Normal file
View File

@ -0,0 +1,6 @@
# Dependency directories
node_modules/
jspm_packages/
# yarn v2
.yarn/

File diff suppressed because one or more lines are too long

13
.yarnrc.yml Normal file
View File

@ -0,0 +1,13 @@
logFilters:
- code: YN0013
level: discard
- code: YN0019
level: discard
- code: YN0076
level: discard
nodeLinker: node-modules
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"

121
README.md
View File

@ -19,21 +19,11 @@ ___
* [Git context](#git-context) * [Git context](#git-context)
* [Path context](#path-context) * [Path context](#path-context)
* [Examples](#examples) * [Examples](#examples)
* [Multi-platform image](https://docs.docker.com/build/ci/github-actions/multi-platform/) * [Summaries](#summaries)
* [Secrets](https://docs.docker.com/build/ci/github-actions/secrets/)
* [Push to multi-registries](https://docs.docker.com/build/ci/github-actions/push-multi-registries/)
* [Manage tags and labels](https://docs.docker.com/build/ci/github-actions/manage-tags-labels/)
* [Cache management](https://docs.docker.com/build/ci/github-actions/cache/)
* [Export to Docker](https://docs.docker.com/build/ci/github-actions/export-docker/)
* [Test before push](https://docs.docker.com/build/ci/github-actions/test-before-push/)
* [Local registry](https://docs.docker.com/build/ci/github-actions/local-registry/)
* [Share built image between jobs](https://docs.docker.com/build/ci/github-actions/share-image-jobs/)
* [Named contexts](https://docs.docker.com/build/ci/github-actions/named-contexts/)
* [Copy image between registries](https://docs.docker.com/build/ci/github-actions/copy-image-registries/)
* [Update Docker Hub repo description](https://docs.docker.com/build/ci/github-actions/update-dockerhub-desc/)
* [Customizing](#customizing) * [Customizing](#customizing)
* [inputs](#inputs) * [inputs](#inputs)
* [outputs](#outputs) * [outputs](#outputs)
* [environment variables](#environment-variables)
* [Troubleshooting](#troubleshooting) * [Troubleshooting](#troubleshooting)
* [Contributing](#contributing) * [Contributing](#contributing)
@ -65,28 +55,26 @@ name: ci
on: on:
push: push:
branches:
- 'main'
jobs: jobs:
docker: docker:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v5 uses: docker/build-push-action@v6
with: with:
push: true push: true
tags: user/app:latest tags: user/app:latest
@ -104,28 +92,15 @@ expression `{{defaultContext}}`. Here we can use it to provide a subdirectory
to the default Git context: to the default Git context:
```yaml ```yaml
-
# Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v5 uses: docker/build-push-action@v6
with: with:
context: "{{defaultContext}}:mysubdir" context: "{{defaultContext}}:mysubdir"
push: true push: true
tags: user/app:latest tags: user/app:latest
``` ```
> **Warning**
>
> Subdirectory for Git context is available from [BuildKit v0.9.0](https://github.com/moby/buildkit/releases/tag/v0.9.0).
> If you're using the `docker` builder (default if `setup-buildx-action` not used),
> then BuildKit in Docker Engine will be used. As Docker Engine < v22.x.x embeds
> Buildkit 0.8.2 at the moment, it does not support this feature. It's therefore
> required to use the `setup-buildx-action` at the moment.
Building from the current repository automatically uses the [GitHub Token](https://docs.github.com/en/actions/security-guides/automatic-token-authentication), Building from the current repository automatically uses the [GitHub Token](https://docs.github.com/en/actions/security-guides/automatic-token-authentication),
so it does not need to be passed. If you want to authenticate against another so it does not need to be passed. If you want to authenticate against another
private repository, you have to use a [secret](https://docs.docker.com/build/ci/github-actions/secrets) private repository, you have to use a [secret](https://docs.docker.com/build/ci/github-actions/secrets)
@ -134,7 +109,7 @@ named `GIT_AUTH_TOKEN` to be able to authenticate against it with Buildx:
```yaml ```yaml
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v5 uses: docker/build-push-action@v6
with: with:
push: true push: true
tags: user/app:latest tags: user/app:latest
@ -149,8 +124,6 @@ name: ci
on: on:
push: push:
branches:
- 'main'
jobs: jobs:
docker: docker:
@ -158,22 +131,22 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v5 uses: docker/build-push-action@v6
with: with:
context: . context: .
push: true push: true
@ -189,17 +162,54 @@ jobs:
* [Cache management](https://docs.docker.com/build/ci/github-actions/cache/) * [Cache management](https://docs.docker.com/build/ci/github-actions/cache/)
* [Export to Docker](https://docs.docker.com/build/ci/github-actions/export-docker/) * [Export to Docker](https://docs.docker.com/build/ci/github-actions/export-docker/)
* [Test before push](https://docs.docker.com/build/ci/github-actions/test-before-push/) * [Test before push](https://docs.docker.com/build/ci/github-actions/test-before-push/)
* [Validating build configuration](https://docs.docker.com/build/ci/github-actions/checks/)
* [Local registry](https://docs.docker.com/build/ci/github-actions/local-registry/) * [Local registry](https://docs.docker.com/build/ci/github-actions/local-registry/)
* [Share built image between jobs](https://docs.docker.com/build/ci/github-actions/share-image-jobs/) * [Share built image between jobs](https://docs.docker.com/build/ci/github-actions/share-image-jobs/)
* [Named contexts](https://docs.docker.com/build/ci/github-actions/named-contexts/) * [Named contexts](https://docs.docker.com/build/ci/github-actions/named-contexts/)
* [Copy image between registries](https://docs.docker.com/build/ci/github-actions/copy-image-registries/) * [Copy image between registries](https://docs.docker.com/build/ci/github-actions/copy-image-registries/)
* [Update Docker Hub repo description](https://docs.docker.com/build/ci/github-actions/update-dockerhub-desc/) * [Update Docker Hub repo description](https://docs.docker.com/build/ci/github-actions/update-dockerhub-desc/)
* [SBOM and provenance attestations](https://docs.docker.com/build/ci/github-actions/attestations/)
* [Annotations](https://docs.docker.com/build/ci/github-actions/annotations/)
* [Reproducible builds](https://docs.docker.com/build/ci/github-actions/reproducible-builds/)
## Summaries
This action generates a [job summary](https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/)
that provides a detailed overview of the build execution. The summary shows an
overview of all the steps executed during the build, including the build inputs
and eventual errors.
![build-push-action job summary](./.github/build-push-summary.png)
The summary also includes a link for downloading the build record with
additional details about the build, including build stats, logs, outputs, and
more. The build record can be imported to Docker Desktop for inspecting the
build in greater detail.
> [!WARNING]
>
> If you're using the [`actions/download-artifact`](https://github.com/actions/download-artifact)
> action in your workflow, you need to ignore the build record artifacts
> if `name` and `pattern` inputs are not specified ([defaults to download all artifacts](https://github.com/actions/download-artifact?tab=readme-ov-file#download-all-artifacts) of the workflow),
> otherwise the action will fail:
> ```yaml
> - uses: actions/download-artifact@v4
> with:
> pattern: "!*.dockerbuild"
> ```
> More info: https://github.com/actions/toolkit/pull/1874
Summaries are enabled by default, but can be disabled with the
`DOCKER_BUILD_SUMMARY` [environment variable](#environment-variables).
For more information about summaries, refer to the
[documentation](https://docs.docker.com/go/build-summary/).
## Customizing ## Customizing
### inputs ### inputs
Following inputs can be used as `step.with` keys The following inputs can be used as `step.with` keys:
> `List` type is a newline-delimited string > `List` type is a newline-delimited string
> ```yaml > ```yaml
@ -224,6 +234,7 @@ Following inputs can be used as `step.with` keys
| `build-contexts` | List | List of additional [build contexts](https://docs.docker.com/engine/reference/commandline/buildx_build/#build-context) (e.g., `name=path`) | | `build-contexts` | List | List of additional [build contexts](https://docs.docker.com/engine/reference/commandline/buildx_build/#build-context) (e.g., `name=path`) |
| `cache-from` | List | List of [external cache sources](https://docs.docker.com/engine/reference/commandline/buildx_build/#cache-from) (e.g., `type=local,src=path/to/dir`) | | `cache-from` | List | List of [external cache sources](https://docs.docker.com/engine/reference/commandline/buildx_build/#cache-from) (e.g., `type=local,src=path/to/dir`) |
| `cache-to` | List | List of [cache export destinations](https://docs.docker.com/engine/reference/commandline/buildx_build/#cache-to) (e.g., `type=local,dest=path/to/dir`) | | `cache-to` | List | List of [cache export destinations](https://docs.docker.com/engine/reference/commandline/buildx_build/#cache-to) (e.g., `type=local,dest=path/to/dir`) |
| `call` | String | Set [method for evaluating build](https://docs.docker.com/reference/cli/docker/buildx/build/#call) (e.g., `check`) |
| `cgroup-parent` | String | Optional [parent cgroup](https://docs.docker.com/engine/reference/commandline/build/#use-a-custom-parent-cgroup---cgroup-parent) for the container used in the build | | `cgroup-parent` | String | Optional [parent cgroup](https://docs.docker.com/engine/reference/commandline/build/#use-a-custom-parent-cgroup---cgroup-parent) for the container used in the build |
| `context` | String | Build's context is the set of files located in the specified [`PATH` or `URL`](https://docs.docker.com/engine/reference/commandline/build/) (default [Git context](#git-context)) | | `context` | String | Build's context is the set of files located in the specified [`PATH` or `URL`](https://docs.docker.com/engine/reference/commandline/build/) (default [Git context](#git-context)) |
| `file` | String | Path to the Dockerfile. (default `{context}/Dockerfile`) | | `file` | String | Path to the Dockerfile. (default `{context}/Dockerfile`) |
@ -232,7 +243,7 @@ Following inputs can be used as `step.with` keys
| `network` | String | Set the networking mode for the `RUN` instructions during build | | `network` | String | Set the networking mode for the `RUN` instructions during build |
| `no-cache` | Bool | Do not use cache when building the image (default `false`) | | `no-cache` | Bool | Do not use cache when building the image (default `false`) |
| `no-cache-filters` | List/CSV | Do not cache specified stages | | `no-cache-filters` | List/CSV | Do not cache specified stages |
| `outputs`¹ | List | List of [output destinations](https://docs.docker.com/engine/reference/commandline/buildx_build/#output) (format: `type=local,dest=path`) | | `outputs` | List | List of [output destinations](https://docs.docker.com/engine/reference/commandline/buildx_build/#output) (format: `type=local,dest=path`) |
| `platforms` | List/CSV | List of [target platforms](https://docs.docker.com/engine/reference/commandline/buildx_build/#platform) for build | | `platforms` | List/CSV | List of [target platforms](https://docs.docker.com/engine/reference/commandline/buildx_build/#platform) for build |
| `provenance` | Bool/String | Generate [provenance](https://docs.docker.com/build/attestations/slsa-provenance/) attestation for the build (shorthand for `--attest=type=provenance`) | | `provenance` | Bool/String | Generate [provenance](https://docs.docker.com/build/attestations/slsa-provenance/) attestation for the build (shorthand for `--attest=type=provenance`) |
| `pull` | Bool | Always attempt to pull all referenced images (default `false`) | | `pull` | Bool | Always attempt to pull all referenced images (default `false`) |
@ -248,10 +259,6 @@ Following inputs can be used as `step.with` keys
| `ulimit` | List | [Ulimit](https://docs.docker.com/engine/reference/commandline/buildx_build/#ulimit) options (e.g., `nofile=1024:1024`) | | `ulimit` | List | [Ulimit](https://docs.docker.com/engine/reference/commandline/buildx_build/#ulimit) options (e.g., `nofile=1024:1024`) |
| `github-token` | String | GitHub Token used to authenticate against a repository for [Git context](#git-context) (default `${{ github.token }}`) | | `github-token` | String | GitHub Token used to authenticate against a repository for [Git context](#git-context) (default `${{ github.token }}`) |
> **Note**
>
> * ¹ multiple `outputs` are [not yet supported](https://github.com/moby/buildkit/issues/1555)
### outputs ### outputs
The following outputs are available: The following outputs are available:
@ -262,6 +269,16 @@ The following outputs are available:
| `digest` | String | Image digest | | `digest` | String | Image digest |
| `metadata` | JSON | Build result metadata | | `metadata` | JSON | Build result metadata |
### environment variables
| Name | Type | Default | Description |
|--------------------------------------|--------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `DOCKER_BUILD_CHECKS_ANNOTATIONS` | Bool | `true` | If `false`, GitHub annotations are not generated for [build checks](https://docs.docker.com/build/checks/) |
| `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/) |
## Troubleshooting ## Troubleshooting
See [TROUBLESHOOTING.md](TROUBLESHOOTING.md) See [TROUBLESHOOTING.md](TROUBLESHOOTING.md)

View File

@ -4,7 +4,6 @@
* [BuildKit container logs](#buildkit-container-logs) * [BuildKit container logs](#buildkit-container-logs)
* [With containerd](#with-containerd) * [With containerd](#with-containerd)
* [`repository name must be lowercase`](#repository-name-must-be-lowercase) * [`repository name must be lowercase`](#repository-name-must-be-lowercase)
* [Image not loaded](#image-not-loaded)
## Cannot push to a registry ## Cannot push to a registry
@ -45,7 +44,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
@ -59,7 +58,7 @@ jobs:
uses: crazy-max/ghaction-setup-containerd@v2 uses: crazy-max/ghaction-setup-containerd@v2
- -
name: Build Docker image name: Build Docker image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v6
with: with:
context: . context: .
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
@ -112,7 +111,7 @@ to generate sanitized tags:
tags: latest tags: latest
- name: Build and push - name: Build and push
uses: docker/build-push-action@v5 uses: docker/build-push-action@v6
with: with:
context: . context: .
push: true push: true
@ -130,35 +129,9 @@ Or a dedicated step to sanitize the slug:
script: return 'ghcr.io/${{ github.repository }}'.toLowerCase() script: return 'ghcr.io/${{ github.repository }}'.toLowerCase()
- name: Build and push - name: Build and push
uses: docker/build-push-action@v5 uses: docker/build-push-action@v6
with: with:
context: . context: .
push: true push: true
tags: ${{ steps.repo_slug.outputs.result }}:latest tags: ${{ steps.repo_slug.outputs.result }}:latest
``` ```
## Image not loaded
Sometimes when your workflows are heavy consumers of disk storage, it can happen that build-push-action declares that the built image is loaded, but then not found in the following workflow steps.
- You can use the following solution as workaround, to free space on disk before building docker image using the following workflow step
```yaml
# Free disk space
- name: Free Disk space
shell: bash
run: |
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET
```
- Another workaround can be to call `docker/setup-buildx-action` with docker driver
```yaml
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker
```
More details in the [related issue](https://github.com/docker/build-push-action/issues/321)

View File

@ -1,13 +1,16 @@
import {beforeEach, describe, expect, jest, test} from '@jest/globals'; import {afterEach, beforeEach, describe, expect, jest, test} from '@jest/globals';
import * as fs from 'fs'; import * as fs from 'fs';
import * as path from 'path'; import * as path from 'path';
import {Builder} from '@docker/actions-toolkit/lib/buildx/builder'; import {Builder} from '@docker/actions-toolkit/lib/buildx/builder';
import {Buildx} from '@docker/actions-toolkit/lib/buildx/buildx'; import {Buildx} from '@docker/actions-toolkit/lib/buildx/buildx';
import {Build} from '@docker/actions-toolkit/lib/buildx/build';
import {Context} from '@docker/actions-toolkit/lib/context'; import {Context} from '@docker/actions-toolkit/lib/context';
import {Docker} from '@docker/actions-toolkit/lib/docker/docker'; import {Docker} from '@docker/actions-toolkit/lib/docker/docker';
import {GitHub} from '@docker/actions-toolkit/lib/github'; import {GitHub} from '@docker/actions-toolkit/lib/github';
import {Toolkit} from '@docker/actions-toolkit/lib/toolkit'; import {Toolkit} from '@docker/actions-toolkit/lib/toolkit';
import {BuilderInfo} from '@docker/actions-toolkit/lib/types/builder';
import {BuilderInfo} from '@docker/actions-toolkit/lib/types/buildx/builder';
import {GitHubRepo} from '@docker/actions-toolkit/lib/types/github'; import {GitHubRepo} from '@docker/actions-toolkit/lib/types/github';
import * as context from '../src/context'; import * as context from '../src/context';
@ -35,6 +38,16 @@ jest.spyOn(Docker, 'isAvailable').mockImplementation(async (): Promise<boolean>
return true; return true;
}); });
const metadataJson = path.join(tmpDir, 'metadata.json');
jest.spyOn(Build.prototype, 'getMetadataFilePath').mockImplementation((): string => {
return metadataJson;
});
const imageIDFilePath = path.join(tmpDir, 'iidfile.txt');
jest.spyOn(Build.prototype, 'getImageIDFilePath').mockImplementation((): string => {
return imageIDFilePath;
});
jest.spyOn(Builder.prototype, 'inspect').mockImplementation(async (): Promise<BuilderInfo> => { jest.spyOn(Builder.prototype, 'inspect').mockImplementation(async (): Promise<BuilderInfo> => {
return { return {
name: 'builder2', name: 'builder2',
@ -55,6 +68,7 @@ jest.spyOn(Builder.prototype, 'inspect').mockImplementation(async (): Promise<Bu
}); });
describe('getArgs', () => { describe('getArgs', () => {
const originalEnv = process.env;
beforeEach(() => { beforeEach(() => {
process.env = Object.keys(process.env).reduce((object, key) => { process.env = Object.keys(process.env).reduce((object, key) => {
if (!key.startsWith('INPUT_')) { if (!key.startsWith('INPUT_')) {
@ -63,6 +77,9 @@ describe('getArgs', () => {
return object; return object;
}, {}); }, {});
}); });
afterEach(() => {
process.env = originalEnv;
});
// prettier-ignore // prettier-ignore
test.each([ test.each([
@ -78,9 +95,10 @@ describe('getArgs', () => {
]), ]),
[ [
'build', 'build',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
'.' '.'
] ],
undefined
], ],
[ [
1, 1,
@ -101,9 +119,10 @@ ccc"`],
'--build-arg', 'MY_ARG=val1,val2,val3', '--build-arg', 'MY_ARG=val1,val2,val3',
'--build-arg', 'ARG=val', '--build-arg', 'ARG=val',
'--build-arg', `MULTILINE=aaaa\nbbbb\nccc`, '--build-arg', `MULTILINE=aaaa\nbbbb\nccc`,
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
'https://github.com/docker/build-push-action.git#refs/heads/master' 'https://github.com/docker/build-push-action.git#refs/heads/master'
] ],
undefined
], ],
[ [
2, 2,
@ -117,11 +136,12 @@ ccc"`],
]), ]),
[ [
'build', 'build',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
'--tag', 'name/app:7.4', '--tag', 'name/app:7.4',
'--tag', 'name/app:latest', '--tag', 'name/app:latest',
'https://github.com/docker/build-push-action.git#refs/heads/master' 'https://github.com/docker/build-push-action.git#refs/heads/master'
] ],
undefined
], ],
[ [
3, 3,
@ -141,7 +161,8 @@ ccc"`],
'--label', 'org.opencontainers.image.description=concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit', '--label', 'org.opencontainers.image.description=concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit',
'--output', 'type=local,dest=./release-out', '--output', 'type=local,dest=./release-out',
'.' '.'
] ],
undefined
], ],
[ [
4, 4,
@ -158,7 +179,8 @@ ccc"`],
'build', 'build',
'--platform', 'linux/amd64,linux/arm64', '--platform', 'linux/amd64,linux/arm64',
'.' '.'
] ],
undefined
], ],
[ [
5, 5,
@ -172,9 +194,10 @@ ccc"`],
]), ]),
[ [
'build', 'build',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
'.' '.'
] ],
undefined
], ],
[ [
6, 6,
@ -189,10 +212,11 @@ ccc"`],
]), ]),
[ [
'build', 'build',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
'--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`, '--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`,
'.' '.'
] ],
undefined
], ],
[ [
7, 7,
@ -210,7 +234,8 @@ ccc"`],
'--output', '.', '--output', '.',
'--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`, '--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`,
'https://github.com/docker/build-push-action.git#refs/heads/master' 'https://github.com/docker/build-push-action.git#refs/heads/master'
] ],
undefined
], ],
[ [
8, 8,
@ -230,13 +255,14 @@ ccc"`],
[ [
'build', 'build',
'--file', './test/Dockerfile', '--file', './test/Dockerfile',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
'--platform', 'linux/amd64,linux/arm64', '--platform', 'linux/amd64,linux/arm64',
'--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`, '--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`,
'--builder', 'builder-git-context-2', '--builder', 'builder-git-context-2',
'--push', '--push',
'https://github.com/docker/build-push-action.git#refs/heads/master' 'https://github.com/docker/build-push-action.git#refs/heads/master'
] ],
undefined
], ],
[ [
9, 9,
@ -264,7 +290,7 @@ ccc"`],
[ [
'build', 'build',
'--file', './test/Dockerfile', '--file', './test/Dockerfile',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
'--platform', 'linux/amd64,linux/arm64', '--platform', 'linux/amd64,linux/arm64',
'--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`, '--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`,
'--secret', `id=MYSECRET,src=${tmpName}`, '--secret', `id=MYSECRET,src=${tmpName}`,
@ -273,7 +299,8 @@ ccc"`],
'--builder', 'builder-git-context-2', '--builder', 'builder-git-context-2',
'--push', '--push',
'https://github.com/docker/build-push-action.git#refs/heads/master' 'https://github.com/docker/build-push-action.git#refs/heads/master'
] ],
undefined
], ],
[ [
10, 10,
@ -301,7 +328,7 @@ ccc`],
[ [
'build', 'build',
'--file', './test/Dockerfile', '--file', './test/Dockerfile',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
'--platform', 'linux/amd64,linux/arm64', '--platform', 'linux/amd64,linux/arm64',
'--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`, '--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`,
'--secret', `id=MYSECRET,src=${tmpName}`, '--secret', `id=MYSECRET,src=${tmpName}`,
@ -310,7 +337,8 @@ ccc`],
'--builder', 'builder-git-context-2', '--builder', 'builder-git-context-2',
'--push', '--push',
'https://github.com/docker/build-push-action.git#refs/heads/master' 'https://github.com/docker/build-push-action.git#refs/heads/master'
] ],
undefined
], ],
[ [
11, 11,
@ -330,13 +358,14 @@ ccc`],
[ [
'build', 'build',
'--file', './test/Dockerfile', '--file', './test/Dockerfile',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
'--secret', `id=MY_SECRET,src=${tmpName}`, '--secret', `id=MY_SECRET,src=${tmpName}`,
'--builder', 'builder-git-context-2', '--builder', 'builder-git-context-2',
'--network', 'host', '--network', 'host',
'--push', '--push',
'https://github.com/docker/build-push-action.git#refs/heads/master' 'https://github.com/docker/build-push-action.git#refs/heads/master'
] ],
undefined
], ],
[ [
12, 12,
@ -356,7 +385,8 @@ ccc`],
'--label', 'org.opencontainers.image.description=Reference implementation of operation "filter results (top-n)"', '--label', 'org.opencontainers.image.description=Reference implementation of operation "filter results (top-n)"',
'--output', 'type=local,dest=./release-out', '--output', 'type=local,dest=./release-out',
'.' '.'
] ],
undefined
], ],
[ [
13, 13,
@ -377,12 +407,13 @@ ccc`],
'--add-host', 'docker:10.180.0.1', '--add-host', 'docker:10.180.0.1',
'--add-host', 'foo:10.0.0.1', '--add-host', 'foo:10.0.0.1',
'--file', './test/Dockerfile', '--file', './test/Dockerfile',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
'--metadata-file', path.join(tmpDir, 'metadata-file'), '--metadata-file', metadataJson,
'--network', 'host', '--network', 'host',
'--push', '--push',
'.' '.'
] ],
undefined
], ],
[ [
14, 14,
@ -406,13 +437,14 @@ nproc=3`],
'--add-host', 'foo:10.0.0.1', '--add-host', 'foo:10.0.0.1',
'--cgroup-parent', 'foo', '--cgroup-parent', 'foo',
'--file', './test/Dockerfile', '--file', './test/Dockerfile',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
'--shm-size', '2g', '--shm-size', '2g',
'--ulimit', 'nofile=1024:1024', '--ulimit', 'nofile=1024:1024',
'--ulimit', 'nproc=3', '--ulimit', 'nproc=3',
'--metadata-file', path.join(tmpDir, 'metadata-file'), '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
15, 15,
@ -426,10 +458,11 @@ nproc=3`],
]), ]),
[ [
'build', 'build',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
'--metadata-file', path.join(tmpDir, 'metadata-file'), '--metadata-file', metadataJson,
'https://github.com/docker/build-push-action.git#refs/heads/master:docker' 'https://github.com/docker/build-push-action.git#refs/heads/master:docker'
] ],
undefined
], ],
[ [
16, 16,
@ -444,11 +477,12 @@ nproc=3`],
]), ]),
[ [
'build', 'build',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
'--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`, '--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`,
'--metadata-file', path.join(tmpDir, 'metadata-file'), '--metadata-file', metadataJson,
'https://github.com/docker/build-push-action.git#refs/heads/master:subdir' 'https://github.com/docker/build-push-action.git#refs/heads/master:subdir'
] ],
undefined
], ],
[ [
17, 17,
@ -463,10 +497,11 @@ nproc=3`],
]), ]),
[ [
'build', 'build',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
'--metadata-file', path.join(tmpDir, 'metadata-file'), '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
18, 18,
@ -480,11 +515,12 @@ nproc=3`],
]), ]),
[ [
'build', 'build',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
"--provenance", `mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`, '--attest', `type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`,
'--metadata-file', path.join(tmpDir, 'metadata-file'), '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
19, 19,
@ -499,11 +535,12 @@ nproc=3`],
]), ]),
[ [
'build', 'build',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
"--provenance", `builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`, '--attest', `type=provenance,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`,
'--metadata-file', path.join(tmpDir, 'metadata-file'), '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
20, 20,
@ -518,11 +555,12 @@ nproc=3`],
]), ]),
[ [
'build', 'build',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
"--provenance", `mode=max,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`, '--attest', `type=provenance,mode=max,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`,
'--metadata-file', path.join(tmpDir, 'metadata-file'), '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
21, 21,
@ -537,11 +575,12 @@ nproc=3`],
]), ]),
[ [
'build', 'build',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
"--provenance", 'false', '--attest', 'type=provenance,disabled=true',
'--metadata-file', path.join(tmpDir, 'metadata-file'), '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
22, 22,
@ -556,11 +595,12 @@ nproc=3`],
]), ]),
[ [
'build', 'build',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
"--provenance", 'builder-id=foo', '--attest', 'type=provenance,builder-id=foo',
'--metadata-file', path.join(tmpDir, 'metadata-file'), '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
23, 23,
@ -575,11 +615,12 @@ nproc=3`],
]), ]),
[ [
'build', 'build',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
"--output", 'type=docker', "--output", 'type=docker',
'--metadata-file', path.join(tmpDir, 'metadata-file'), '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
24, 24,
@ -593,11 +634,12 @@ nproc=3`],
]), ]),
[ [
'build', 'build',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
'--load', '--load',
'--metadata-file', path.join(tmpDir, 'metadata-file'), '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
25, 25,
@ -613,14 +655,15 @@ nproc=3`],
[ [
'build', 'build',
'--build-arg', 'FOO=bar#baz', '--build-arg', 'FOO=bar#baz',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
'--load', '--load',
'--metadata-file', path.join(tmpDir, 'metadata-file'), '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
25, 26,
'0.10.0', '0.10.0',
new Map<string, string>([ new Map<string, string>([
['context', '.'], ['context', '.'],
@ -635,14 +678,15 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`]
'build', 'build',
'--secret', 'id=MY_SECRET,env=MY_SECRET_ENV', '--secret', 'id=MY_SECRET,env=MY_SECRET_ENV',
'--secret', 'id=ANOTHER_SECRET,env=ANOTHER_SECRET_ENV', '--secret', 'id=ANOTHER_SECRET,env=ANOTHER_SECRET_ENV',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
'--load', '--load',
'--metadata-file', path.join(tmpDir, 'metadata-file'), '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
26, 27,
'0.10.0', '0.10.0',
new Map<string, string>([ new Map<string, string>([
['context', '.'], ['context', '.'],
@ -656,14 +700,15 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`]
'build', 'build',
'--secret', 'id=MY_SECRET,env=MY_SECRET_ENV', '--secret', 'id=MY_SECRET,env=MY_SECRET_ENV',
'--secret', 'id=ANOTHER_SECRET,env=ANOTHER_SECRET_ENV', '--secret', 'id=ANOTHER_SECRET,env=ANOTHER_SECRET_ENV',
'--iidfile', path.join(tmpDir, 'iidfile'), '--iidfile', imageIDFilePath,
'--load', '--load',
'--metadata-file', path.join(tmpDir, 'metadata-file'), '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
27, 28,
'0.11.0', '0.11.0',
new Map<string, string>([ new Map<string, string>([
['context', '.'], ['context', '.'],
@ -677,13 +722,14 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`]
[ [
'build', 'build',
'--output', 'type=local,dest=./release-out', '--output', 'type=local,dest=./release-out',
"--provenance", `mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`, '--attest', `type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`,
'--metadata-file', path.join(tmpDir, 'metadata-file'), '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
28, 29,
'0.12.0', '0.12.0',
new Map<string, string>([ new Map<string, string>([
['context', '.'], ['context', '.'],
@ -701,14 +747,124 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`]
'--annotation', 'manifest:example3=yyy', '--annotation', 'manifest:example3=yyy',
'--annotation', 'manifest-descriptor[linux/amd64]:example4=zzz', '--annotation', 'manifest-descriptor[linux/amd64]:example4=zzz',
'--output', 'type=local,dest=./release-out', '--output', 'type=local,dest=./release-out',
"--provenance", `mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`, '--attest', `type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`,
'--metadata-file', path.join(tmpDir, 'metadata-file'), '--metadata-file', metadataJson,
'.' '.'
] ],
] undefined
],
[
30,
'0.12.0',
new Map<string, string>([
['context', '.'],
['outputs', `type=image,"name=localhost:5000/name/app:latest,localhost:5000/name/app:foo",push-by-digest=true,name-canonical=true,push=true`],
['load', 'false'],
['no-cache', 'false'],
['push', 'false'],
['pull', 'false'],
]),
[
'build',
'--iidfile', imageIDFilePath,
"--output", `type=image,"name=localhost:5000/name/app:latest,localhost:5000/name/app:foo",push-by-digest=true,name-canonical=true,push=true`,
'--attest', `type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`,
'--metadata-file', metadataJson,
'.'
],
undefined
],
[
31,
'0.13.1',
new Map<string, string>([
['context', '.'],
['load', 'false'],
['no-cache', 'false'],
['push', 'false'],
['pull', 'false'],
['provenance', 'mode=max'],
['sbom', 'true'],
]),
[
'build',
'--iidfile', imageIDFilePath,
'--attest', `type=provenance,mode=max,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`,
'--attest', `type=sbom,disabled=false`,
'--metadata-file', metadataJson,
'.'
],
undefined
],
[
32,
'0.13.1',
new Map<string, string>([
['context', '.'],
['load', 'false'],
['no-cache', 'false'],
['push', 'false'],
['pull', 'false'],
['attests', 'type=provenance,mode=min'],
['provenance', 'mode=max'],
]),
[
'build',
'--iidfile', imageIDFilePath,
'--attest', `type=provenance,mode=max,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`,
'--metadata-file', metadataJson,
'.'
],
undefined
],
[
33,
'0.13.1',
new Map<string, string>([
['context', '.'],
['load', 'false'],
['no-cache', 'false'],
['push', 'false'],
['pull', 'false'],
['attests', 'type=provenance,mode=min'],
]),
[
'build',
'--iidfile', imageIDFilePath,
'--attest', `type=provenance,mode=min,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`,
'--metadata-file', metadataJson,
'.'
],
undefined
],
[
34,
'0.13.1',
new Map<string, string>([
['context', '.'],
['load', 'false'],
['no-cache', 'false'],
['push', 'false'],
['pull', 'false']
]),
[
'build',
'--iidfile', imageIDFilePath,
'--metadata-file', metadataJson,
'.'
],
new Map<string, string>([
['BUILDX_NO_DEFAULT_ATTESTATIONS', '1']
])
],
])( ])(
'[%d] given %p with %p as inputs, returns %p', '[%d] given %p with %p as inputs, returns %p',
async (num: number, buildxVersion: string, inputs: Map<string, string>, expected: Array<string>) => { 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) => {
process.env[name] = value;
});
}
inputs.forEach((value: string, name: string) => { inputs.forEach((value: string, name: string) => {
setInput(name, value); setInput(name, value);
}); });

View File

@ -34,6 +34,9 @@ inputs:
cache-to: cache-to:
description: "List of cache export destinations for buildx (e.g., user/app:cache, type=local,dest=path/to/dir)" description: "List of cache export destinations for buildx (e.g., user/app:cache, type=local,dest=path/to/dir)"
required: false required: false
call:
description: "Set method for evaluating build (e.g., check)"
required: false
cgroup-parent: cgroup-parent:
description: "Optional parent cgroup for the container used in the build" description: "Optional parent cgroup for the container used in the build"
required: false required: false

View File

@ -5,9 +5,16 @@ ARG NODE_VERSION=20
FROM node:${NODE_VERSION}-alpine AS base FROM node:${NODE_VERSION}-alpine AS base
RUN apk add --no-cache cpio findutils git RUN apk add --no-cache cpio findutils git
WORKDIR /src WORKDIR /src
RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/.yarn/cache <<EOT
corepack enable
yarn --version
yarn config set --home enableTelemetry 0
EOT
FROM base AS deps FROM base AS deps
RUN --mount=type=bind,target=.,rw \ RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/.yarn/cache \
--mount=type=cache,target=/src/node_modules \ --mount=type=cache,target=/src/node_modules \
yarn install && mkdir /vendor && cp yarn.lock /vendor yarn install && mkdir /vendor && cp yarn.lock /vendor
@ -16,18 +23,19 @@ COPY --from=deps /vendor /
FROM deps AS vendor-validate FROM deps AS vendor-validate
RUN --mount=type=bind,target=.,rw <<EOT RUN --mount=type=bind,target=.,rw <<EOT
set -e set -e
git add -A git add -A
cp -rf /vendor/* . cp -rf /vendor/* .
if [ -n "$(git status --porcelain -- yarn.lock)" ]; then 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-update"'
git status --porcelain -- yarn.lock git status --porcelain -- yarn.lock
exit 1 exit 1
fi fi
EOT EOT
FROM deps AS build FROM deps AS build
RUN --mount=type=bind,target=.,rw \ RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/.yarn/cache \
--mount=type=cache,target=/src/node_modules \ --mount=type=cache,target=/src/node_modules \
yarn run build && mkdir /out && cp -Rf dist /out/ yarn run build && mkdir /out && cp -Rf dist /out/
@ -36,32 +44,35 @@ COPY --from=build /out /
FROM build AS build-validate FROM build AS build-validate
RUN --mount=type=bind,target=.,rw <<EOT RUN --mount=type=bind,target=.,rw <<EOT
set -e set -e
git add -A git add -A
cp -rf /out/* . cp -rf /out/* .
if [ -n "$(git status --porcelain -- dist)" ]; then if [ -n "$(git status --porcelain -- dist)" ]; then
echo >&2 'ERROR: Build result differs. Please build first with "docker buildx bake build"' echo >&2 'ERROR: Build result differs. Please build first with "docker buildx bake build"'
git status --porcelain -- dist git status --porcelain -- dist
exit 1 exit 1
fi fi
EOT EOT
FROM deps AS format FROM deps AS format
RUN --mount=type=bind,target=.,rw \ RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/.yarn/cache \
--mount=type=cache,target=/src/node_modules \ --mount=type=cache,target=/src/node_modules \
yarn run format \ yarn run format \
&& mkdir /out && find . -name '*.ts' -not -path './node_modules/*' | cpio -pdm /out && mkdir /out && find . -name '*.ts' -not -path './node_modules/*' -not -path './.yarn/*' | cpio -pdm /out
FROM scratch AS format-update FROM scratch AS format-update
COPY --from=format /out / COPY --from=format /out /
FROM deps AS lint FROM deps AS lint
RUN --mount=type=bind,target=.,rw \ RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/.yarn/cache \
--mount=type=cache,target=/src/node_modules \ --mount=type=cache,target=/src/node_modules \
yarn run lint yarn run lint
FROM deps AS test FROM deps AS test
RUN --mount=type=bind,target=.,rw \ RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/.yarn/cache \
--mount=type=cache,target=/src/node_modules \ --mount=type=cache,target=/src/node_modules \
yarn run test --coverage --coverageDirectory=/tmp/coverage yarn run test --coverage --coverageDirectory=/tmp/coverage

91
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

2086
dist/licenses.txt generated vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,15 @@
target "_common" {
args = {
BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1
}
}
group "default" { group "default" {
targets = ["build"] targets = ["build"]
} }
group "pre-checkin" { group "pre-checkin" {
targets = ["vendor-update", "format", "build"] targets = ["vendor", "format", "build"]
} }
group "validate" { group "validate" {
@ -11,42 +17,49 @@ group "validate" {
} }
target "build" { target "build" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile" dockerfile = "dev.Dockerfile"
target = "build-update" target = "build-update"
output = ["."] output = ["."]
} }
target "build-validate" { target "build-validate" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile" dockerfile = "dev.Dockerfile"
target = "build-validate" target = "build-validate"
output = ["type=cacheonly"] output = ["type=cacheonly"]
} }
target "format" { target "format" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile" dockerfile = "dev.Dockerfile"
target = "format-update" target = "format-update"
output = ["."] output = ["."]
} }
target "lint" { target "lint" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile" dockerfile = "dev.Dockerfile"
target = "lint" target = "lint"
output = ["type=cacheonly"] output = ["type=cacheonly"]
} }
target "vendor-update" { target "vendor" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile" dockerfile = "dev.Dockerfile"
target = "vendor-update" target = "vendor-update"
output = ["."] output = ["."]
} }
target "vendor-validate" { target "vendor-validate" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile" dockerfile = "dev.Dockerfile"
target = "vendor-validate" target = "vendor-validate"
output = ["type=cacheonly"] output = ["type=cacheonly"]
} }
target "test" { target "test" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile" dockerfile = "dev.Dockerfile"
target = "test-coverage" target = "test-coverage"
output = ["./coverage"] output = ["./coverage"]

View File

@ -1,3 +0,0 @@
# Cache
This page has moved to [Docker Docs website](https://docs.docker.com/build/ci/github-actions/cache/)

View File

@ -1,3 +0,0 @@
# Copy images between registries
This page has moved to [Docker Docs website](https://docs.docker.com/build/ci/github-actions/copy-image-registries/)

View File

@ -1,3 +0,0 @@
# Update Docker Hub repo description
This page has moved to [Docker Docs website](https://docs.docker.com/build/ci/github-actions/update-dockerhub-desc/)

View File

@ -1,3 +0,0 @@
# Export image to Docker
This page has moved to [Docker Docs website](https://docs.docker.com/build/ci/github-actions/export-docker/)

View File

@ -1,3 +0,0 @@
# Isolated builders
This page has moved to [Docker Docs website](https://docs.docker.com/build/ci/github-actions/configure-builder/#isolated-builders)

View File

@ -1,3 +0,0 @@
# Local registry
This page has moved to [Docker Docs website](https://docs.docker.com/build/ci/github-actions/local-registry/)

View File

@ -1,3 +0,0 @@
# Multi-platform image
This page has moved to [Docker Docs website](https://docs.docker.com/build/ci/github-actions/multi-platform/)

View File

@ -1,3 +0,0 @@
# Named contexts
This page has moved to [Docker Docs website](https://docs.docker.com/build/ci/github-actions/named-contexts/)

View File

@ -1,3 +0,0 @@
# Push to multi-registries
This page has moved to [Docker Docs website](https://docs.docker.com/build/ci/github-actions/push-multi-registries/)

View File

@ -1,3 +0,0 @@
# Secrets
This page has moved to [Docker Docs website](https://docs.docker.com/build/ci/github-actions/secrets/)

View File

@ -1,3 +0,0 @@
# Share built image between jobs
This page has moved to [Docker Docs website](https://docs.docker.com/build/ci/github-actions/share-image-jobs/)

View File

@ -1,3 +0,0 @@
# Handle tags and labels
This page has moved to [Docker Docs website](https://docs.docker.com/build/ci/github-actions/manage-tags-labels/)

View File

@ -1,3 +0,0 @@
# Test your image before pushing it
This page has moved to [Docker Docs website](https://docs.docker.com/build/ci/github-actions/test-before-push/)

View File

@ -1,17 +1,16 @@
{ {
"name": "docker-build-push", "name": "docker-build-push",
"description": "Build and push Docker images", "description": "Build and push Docker images",
"main": "lib/main.js", "main": "src/main.ts",
"scripts": { "scripts": {
"build": "ncc build src/main.ts --source-map --minify --license licenses.txt", "build": "ncc build --source-map --minify --license licenses.txt",
"lint": "yarn run prettier && yarn run eslint", "lint": "yarn run prettier && yarn run eslint",
"format": "yarn run prettier:fix && yarn run eslint:fix", "format": "yarn run prettier:fix && yarn run eslint:fix",
"eslint": "eslint --max-warnings=0 .", "eslint": "eslint --max-warnings=0 .",
"eslint:fix": "eslint --fix .", "eslint:fix": "eslint --fix .",
"prettier": "prettier --check \"./**/*.ts\"", "prettier": "prettier --check \"./**/*.ts\"",
"prettier:fix": "prettier --write \"./**/*.ts\"", "prettier:fix": "prettier --write \"./**/*.ts\"",
"test": "jest", "test": "jest"
"all": "yarn run build && yarn run format && yarn test"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@ -25,25 +24,25 @@
], ],
"author": "Docker Inc.", "author": "Docker Inc.",
"license": "Apache-2.0", "license": "Apache-2.0",
"packageManager": "yarn@3.6.3",
"dependencies": { "dependencies": {
"@actions/core": "^1.10.1", "@actions/core": "^1.11.1",
"@docker/actions-toolkit": "0.14.0", "@docker/actions-toolkit": "0.62.1",
"handlebars": "^4.7.7" "handlebars": "^4.7.7"
}, },
"devDependencies": { "devDependencies": {
"@types/csv-parse": "^1.2.2", "@types/node": "^20.12.12",
"@types/node": "^20.5.9", "@typescript-eslint/eslint-plugin": "^7.9.0",
"@typescript-eslint/eslint-plugin": "^6.6.0", "@typescript-eslint/parser": "^7.9.0",
"@typescript-eslint/parser": "^6.6.0", "@vercel/ncc": "^0.38.1",
"@vercel/ncc": "^0.38.0", "eslint": "^8.57.0",
"eslint": "^8.48.0", "eslint-config-prettier": "^9.1.0",
"eslint-config-prettier": "^9.0.0", "eslint-plugin-jest": "^28.5.0",
"eslint-plugin-jest": "^27.2.3", "eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-prettier": "^5.0.0", "jest": "^29.7.0",
"jest": "^29.6.4", "prettier": "^3.2.5",
"prettier": "^3.0.3", "ts-jest": "^29.1.2",
"ts-jest": "^29.1.1", "ts-node": "^10.9.2",
"ts-node": "^10.9.1", "typescript": "^5.4.5"
"typescript": "^5.2.2"
} }
} }

View File

@ -1,29 +1,31 @@
import * as core from '@actions/core'; import * as core from '@actions/core';
import * as handlebars from 'handlebars'; import * as handlebars from 'handlebars';
import {Build} from '@docker/actions-toolkit/lib/buildx/build';
import {Context} from '@docker/actions-toolkit/lib/context'; import {Context} from '@docker/actions-toolkit/lib/context';
import {GitHub} from '@docker/actions-toolkit/lib/github'; import {GitHub} from '@docker/actions-toolkit/lib/github';
import {Inputs as BuildxInputs} from '@docker/actions-toolkit/lib/buildx/inputs';
import {Toolkit} from '@docker/actions-toolkit/lib/toolkit'; import {Toolkit} from '@docker/actions-toolkit/lib/toolkit';
import {Util} from '@docker/actions-toolkit/lib/util'; import {Util} from '@docker/actions-toolkit/lib/util';
export interface Inputs { export interface Inputs {
addHosts: string[]; 'add-hosts': string[];
allow: string[]; allow: string[];
annotations: string[]; annotations: string[];
attests: string[]; attests: string[];
buildArgs: string[]; 'build-args': string[];
buildContexts: string[]; 'build-contexts': string[];
builder: string; builder: string;
cacheFrom: string[]; 'cache-from': string[];
cacheTo: string[]; 'cache-to': string[];
cgroupParent: string; call: string;
'cgroup-parent': string;
context: string; context: string;
file: string; file: string;
labels: string[]; labels: string[];
load: boolean; load: boolean;
network: string; network: string;
noCache: boolean; 'no-cache': boolean;
noCacheFilters: string[]; 'no-cache-filters': string[];
outputs: string[]; outputs: string[];
platforms: string[]; platforms: string[];
provenance: string; provenance: string;
@ -31,50 +33,51 @@ export interface Inputs {
push: boolean; push: boolean;
sbom: string; sbom: string;
secrets: string[]; secrets: string[];
secretEnvs: string[]; 'secret-envs': string[];
secretFiles: string[]; 'secret-files': string[];
shmSize: string; 'shm-size': string;
ssh: string[]; ssh: string[];
tags: string[]; tags: string[];
target: string; target: string;
ulimit: string[]; ulimit: string[];
githubToken: string; 'github-token': string;
} }
export async function getInputs(): Promise<Inputs> { export async function getInputs(): Promise<Inputs> {
return { return {
addHosts: Util.getInputList('add-hosts'), 'add-hosts': Util.getInputList('add-hosts'),
allow: Util.getInputList('allow'), allow: Util.getInputList('allow'),
annotations: Util.getInputList('annotations', {ignoreComma: true}), annotations: Util.getInputList('annotations', {ignoreComma: true}),
attests: Util.getInputList('attests', {ignoreComma: true}), attests: Util.getInputList('attests', {ignoreComma: true}),
buildArgs: Util.getInputList('build-args', {ignoreComma: true}), 'build-args': Util.getInputList('build-args', {ignoreComma: true}),
buildContexts: Util.getInputList('build-contexts', {ignoreComma: true}), 'build-contexts': Util.getInputList('build-contexts', {ignoreComma: true}),
builder: core.getInput('builder'), builder: core.getInput('builder'),
cacheFrom: Util.getInputList('cache-from', {ignoreComma: true}), 'cache-from': Util.getInputList('cache-from', {ignoreComma: true}),
cacheTo: Util.getInputList('cache-to', {ignoreComma: true}), 'cache-to': Util.getInputList('cache-to', {ignoreComma: true}),
cgroupParent: core.getInput('cgroup-parent'), call: core.getInput('call'),
'cgroup-parent': core.getInput('cgroup-parent'),
context: core.getInput('context') || Context.gitContext(), context: core.getInput('context') || Context.gitContext(),
file: core.getInput('file'), file: core.getInput('file'),
labels: Util.getInputList('labels', {ignoreComma: true}), labels: Util.getInputList('labels', {ignoreComma: true}),
load: core.getBooleanInput('load'), load: core.getBooleanInput('load'),
network: core.getInput('network'), network: core.getInput('network'),
noCache: core.getBooleanInput('no-cache'), 'no-cache': core.getBooleanInput('no-cache'),
noCacheFilters: Util.getInputList('no-cache-filters'), 'no-cache-filters': Util.getInputList('no-cache-filters'),
outputs: Util.getInputList('outputs', {ignoreComma: true}), outputs: Util.getInputList('outputs', {ignoreComma: true, quote: false}),
platforms: Util.getInputList('platforms'), platforms: Util.getInputList('platforms'),
provenance: BuildxInputs.getProvenanceInput('provenance'), provenance: Build.getProvenanceInput('provenance'),
pull: core.getBooleanInput('pull'), pull: core.getBooleanInput('pull'),
push: core.getBooleanInput('push'), push: core.getBooleanInput('push'),
sbom: core.getInput('sbom'), sbom: core.getInput('sbom'),
secrets: Util.getInputList('secrets', {ignoreComma: true}), secrets: Util.getInputList('secrets', {ignoreComma: true}),
secretEnvs: Util.getInputList('secret-envs'), 'secret-envs': Util.getInputList('secret-envs'),
secretFiles: Util.getInputList('secret-files', {ignoreComma: true}), 'secret-files': Util.getInputList('secret-files', {ignoreComma: true}),
shmSize: core.getInput('shm-size'), 'shm-size': core.getInput('shm-size'),
ssh: Util.getInputList('ssh'), ssh: Util.getInputList('ssh'),
tags: Util.getInputList('tags'), tags: Util.getInputList('tags'),
target: core.getInput('target'), target: core.getInput('target'),
ulimit: Util.getInputList('ulimit', {ignoreComma: true}), ulimit: Util.getInputList('ulimit', {ignoreComma: true}),
githubToken: core.getInput('github-token') 'github-token': core.getInput('github-token')
}; };
} }
@ -92,42 +95,52 @@ export async function getArgs(inputs: Inputs, toolkit: Toolkit): Promise<Array<s
async function getBuildArgs(inputs: Inputs, context: string, toolkit: Toolkit): Promise<Array<string>> { async function getBuildArgs(inputs: Inputs, context: string, toolkit: Toolkit): Promise<Array<string>> {
const args: Array<string> = ['build']; const args: Array<string> = ['build'];
await Util.asyncForEach(inputs.addHosts, async addHost => { await Util.asyncForEach(inputs['add-hosts'], async addHost => {
args.push('--add-host', addHost); args.push('--add-host', addHost);
}); });
if (inputs.allow.length > 0) { await Util.asyncForEach(inputs.allow, async allow => {
args.push('--allow', inputs.allow.join(',')); args.push('--allow', allow);
} });
if (await toolkit.buildx.versionSatisfies('>=0.10.0')) {
await Util.asyncForEach(inputs.attests, async attest => {
args.push('--attest', attest);
});
}
if (await toolkit.buildx.versionSatisfies('>=0.12.0')) { if (await toolkit.buildx.versionSatisfies('>=0.12.0')) {
await Util.asyncForEach(inputs.annotations, async annotation => { await Util.asyncForEach(inputs.annotations, async annotation => {
args.push('--annotation', annotation); args.push('--annotation', annotation);
}); });
} else if (inputs.annotations.length > 0) {
core.warning("Annotations are only supported by buildx >= 0.12.0; the input 'annotations' is ignored.");
} }
await Util.asyncForEach(inputs.buildArgs, async buildArg => { await Util.asyncForEach(inputs['build-args'], async buildArg => {
args.push('--build-arg', buildArg); args.push('--build-arg', buildArg);
}); });
if (await toolkit.buildx.versionSatisfies('>=0.8.0')) { if (await toolkit.buildx.versionSatisfies('>=0.8.0')) {
await Util.asyncForEach(inputs.buildContexts, async buildContext => { await Util.asyncForEach(inputs['build-contexts'], async buildContext => {
args.push('--build-context', buildContext); args.push(
'--build-context',
handlebars.compile(buildContext)({
defaultContext: Context.gitContext()
})
);
}); });
} else if (inputs['build-contexts'].length > 0) {
core.warning("Build contexts are only supported by buildx >= 0.8.0; the input 'build-contexts' is ignored.");
} }
await Util.asyncForEach(inputs.cacheFrom, async cacheFrom => { await Util.asyncForEach(inputs['cache-from'], async cacheFrom => {
args.push('--cache-from', cacheFrom); args.push('--cache-from', cacheFrom);
}); });
await Util.asyncForEach(inputs.cacheTo, async cacheTo => { await Util.asyncForEach(inputs['cache-to'], async cacheTo => {
args.push('--cache-to', cacheTo); args.push('--cache-to', cacheTo);
}); });
if (inputs.cgroupParent) { if (inputs.call) {
args.push('--cgroup-parent', inputs.cgroupParent); if (!(await toolkit.buildx.versionSatisfies('>=0.15.0'))) {
throw new Error(`Buildx >= 0.15.0 is required to use the call flag.`);
}
args.push('--call', inputs.call);
} }
await Util.asyncForEach(inputs.secretEnvs, async secretEnv => { if (inputs['cgroup-parent']) {
args.push('--cgroup-parent', inputs['cgroup-parent']);
}
await Util.asyncForEach(inputs['secret-envs'], async secretEnv => {
try { try {
args.push('--secret', BuildxInputs.resolveBuildSecretEnv(secretEnv)); args.push('--secret', Build.resolveSecretEnv(secretEnv));
} catch (err) { } catch (err) {
core.warning(err.message); core.warning(err.message);
} }
@ -135,13 +148,13 @@ async function getBuildArgs(inputs: Inputs, context: string, toolkit: Toolkit):
if (inputs.file) { if (inputs.file) {
args.push('--file', inputs.file); args.push('--file', inputs.file);
} }
if (!BuildxInputs.hasLocalExporter(inputs.outputs) && !BuildxInputs.hasTarExporter(inputs.outputs) && (inputs.platforms.length == 0 || (await toolkit.buildx.versionSatisfies('>=0.4.2')))) { if (!Build.hasLocalExporter(inputs.outputs) && !Build.hasTarExporter(inputs.outputs) && (inputs.platforms.length == 0 || (await toolkit.buildx.versionSatisfies('>=0.4.2')))) {
args.push('--iidfile', BuildxInputs.getBuildImageIDFilePath()); args.push('--iidfile', toolkit.buildxBuild.getImageIDFilePath());
} }
await Util.asyncForEach(inputs.labels, async label => { await Util.asyncForEach(inputs.labels, async label => {
args.push('--label', label); args.push('--label', label);
}); });
await Util.asyncForEach(inputs.noCacheFilters, async noCacheFilter => { await Util.asyncForEach(inputs['no-cache-filters'], async noCacheFilter => {
args.push('--no-cache-filter', noCacheFilter); args.push('--no-cache-filter', noCacheFilter);
}); });
await Util.asyncForEach(inputs.outputs, async output => { await Util.asyncForEach(inputs.outputs, async output => {
@ -151,44 +164,29 @@ async function getBuildArgs(inputs: Inputs, context: string, toolkit: Toolkit):
args.push('--platform', inputs.platforms.join(',')); args.push('--platform', inputs.platforms.join(','));
} }
if (await toolkit.buildx.versionSatisfies('>=0.10.0')) { if (await toolkit.buildx.versionSatisfies('>=0.10.0')) {
if (inputs.provenance) { args.push(...(await getAttestArgs(inputs, toolkit)));
args.push('--provenance', inputs.provenance); } else {
} else if ((await toolkit.buildkit.versionSatisfies(inputs.builder, '>=0.11.0')) && !BuildxInputs.hasDockerExporter(inputs.outputs, inputs.load)) { core.warning("Attestations are only supported by buildx >= 0.10.0; the inputs 'attests', 'provenance' and 'sbom' are ignored.");
// if provenance 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', BuildxInputs.resolveProvenanceAttrs(`mode=min,inline-only=true`));
} else {
// for a public repository, we set max provenance mode.
args.push('--provenance', BuildxInputs.resolveProvenanceAttrs(`mode=max`));
}
}
if (inputs.sbom) {
args.push('--sbom', inputs.sbom);
}
} }
await Util.asyncForEach(inputs.secrets, async secret => { await Util.asyncForEach(inputs.secrets, async secret => {
try { try {
args.push('--secret', BuildxInputs.resolveBuildSecretString(secret)); args.push('--secret', Build.resolveSecretString(secret));
} catch (err) { } catch (err) {
core.warning(err.message); core.warning(err.message);
} }
}); });
await Util.asyncForEach(inputs.secretFiles, async secretFile => { await Util.asyncForEach(inputs['secret-files'], async secretFile => {
try { try {
args.push('--secret', BuildxInputs.resolveBuildSecretFile(secretFile)); args.push('--secret', Build.resolveSecretFile(secretFile));
} catch (err) { } catch (err) {
core.warning(err.message); core.warning(err.message);
} }
}); });
if (inputs.githubToken && !BuildxInputs.hasGitAuthTokenSecret(inputs.secrets) && context.startsWith(Context.gitContext())) { if (inputs['github-token'] && !Build.hasGitAuthTokenSecret(inputs.secrets) && context.startsWith(Context.gitContext())) {
args.push('--secret', BuildxInputs.resolveBuildSecretString(`GIT_AUTH_TOKEN=${inputs.githubToken}`)); args.push('--secret', Build.resolveSecretString(`GIT_AUTH_TOKEN=${inputs['github-token']}`));
} }
if (inputs.shmSize) { if (inputs['shm-size']) {
args.push('--shm-size', inputs.shmSize); args.push('--shm-size', inputs['shm-size']);
} }
await Util.asyncForEach(inputs.ssh, async ssh => { await Util.asyncForEach(inputs.ssh, async ssh => {
args.push('--ssh', ssh); args.push('--ssh', ssh);
@ -214,12 +212,12 @@ async function getCommonArgs(inputs: Inputs, toolkit: Toolkit): Promise<Array<st
args.push('--load'); args.push('--load');
} }
if (await toolkit.buildx.versionSatisfies('>=0.6.0')) { if (await toolkit.buildx.versionSatisfies('>=0.6.0')) {
args.push('--metadata-file', BuildxInputs.getBuildMetadataFilePath()); args.push('--metadata-file', toolkit.buildxBuild.getMetadataFilePath());
} }
if (inputs.network) { if (inputs.network) {
args.push('--network', inputs.network); args.push('--network', inputs.network);
} }
if (inputs.noCache) { if (inputs['no-cache']) {
args.push('--no-cache'); args.push('--no-cache');
} }
if (inputs.pull) { if (inputs.pull) {
@ -230,3 +228,59 @@ async function getCommonArgs(inputs: Inputs, toolkit: Toolkit): Promise<Array<st
} }
return args; return args;
} }
async function getAttestArgs(inputs: Inputs, toolkit: Toolkit): Promise<Array<string>> {
const args: Array<string> = [];
// check if provenance attestation is set in attests input
let hasAttestProvenance = false;
await Util.asyncForEach(inputs.attests, async (attest: string) => {
if (Build.hasAttestationType('provenance', attest)) {
hasAttestProvenance = true;
}
});
let provenanceSet = false;
let sbomSet = false;
if (inputs.provenance) {
args.push('--attest', Build.resolveAttestationAttrs(`type=provenance,${inputs.provenance}`));
provenanceSet = true;
} else if (!hasAttestProvenance && !noDefaultAttestations() && (await toolkit.buildkit.versionSatisfies(inputs.builder, '>=0.11.0')) && !Build.hasDockerExporter(inputs.outputs, inputs.load)) {
// if provenance not specified in provenance or attests inputs 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('--attest', `type=provenance,${Build.resolveProvenanceAttrs(`mode=min,inline-only=true`)}`);
} else {
// for a public repository, we set max provenance mode.
args.push('--attest', `type=provenance,${Build.resolveProvenanceAttrs(`mode=max`)}`);
}
}
if (inputs.sbom) {
args.push('--attest', Build.resolveAttestationAttrs(`type=sbom,${inputs.sbom}`));
sbomSet = true;
}
// set attests but check if provenance or sbom types already set as
// provenance and sbom inputs take precedence over attests input.
await Util.asyncForEach(inputs.attests, async (attest: string) => {
if (!Build.hasAttestationType('provenance', attest) && !Build.hasAttestationType('sbom', attest)) {
args.push('--attest', Build.resolveAttestationAttrs(attest));
} else if (!provenanceSet && Build.hasAttestationType('provenance', attest)) {
args.push('--attest', Build.resolveProvenanceAttrs(attest));
} else if (!sbomSet && Build.hasAttestationType('sbom', attest)) {
args.push('--attest', attest);
}
});
return args;
}
function noDefaultAttestations(): boolean {
if (process.env.BUILDX_NO_DEFAULT_ATTESTATIONS) {
return Util.parseBool(process.env.BUILDX_NO_DEFAULT_ATTESTATIONS);
}
return false;
}

View File

@ -3,20 +3,30 @@ import * as path from 'path';
import * as stateHelper from './state-helper'; import * as stateHelper from './state-helper';
import * as core from '@actions/core'; import * as core from '@actions/core';
import * as actionsToolkit from '@docker/actions-toolkit'; 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 {Context} from '@docker/actions-toolkit/lib/context';
import {Docker} from '@docker/actions-toolkit/lib/docker/docker'; import {Docker} from '@docker/actions-toolkit/lib/docker/docker';
import {Exec} from '@docker/actions-toolkit/lib/exec'; import {Exec} from '@docker/actions-toolkit/lib/exec';
import {GitHub} from '@docker/actions-toolkit/lib/github'; import {GitHub} from '@docker/actions-toolkit/lib/github';
import {Inputs as BuildxInputs} from '@docker/actions-toolkit/lib/buildx/inputs';
import {Toolkit} from '@docker/actions-toolkit/lib/toolkit'; import {Toolkit} from '@docker/actions-toolkit/lib/toolkit';
import {ConfigFile} from '@docker/actions-toolkit/lib/types/docker'; import {Util} from '@docker/actions-toolkit/lib/util';
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 * as context from './context'; import * as context from './context';
actionsToolkit.run( actionsToolkit.run(
// main // main
async () => { async () => {
const startedTime = new Date();
const inputs: context.Inputs = await context.getInputs(); const inputs: context.Inputs = await context.getInputs();
stateHelper.setSummaryInputs(inputs);
core.debug(`inputs: ${JSON.stringify(inputs)}`);
const toolkit = new Toolkit(); const toolkit = new Toolkit();
await core.group(`GitHub Actions runtime token ACs`, async () => { await core.group(`GitHub Actions runtime token ACs`, async () => {
@ -72,20 +82,44 @@ actionsToolkit.run(
await toolkit.buildx.printVersion(); await toolkit.buildx.printVersion();
}); });
let builder: BuilderInfo;
await core.group(`Builder info`, async () => {
builder = await toolkit.builder.inspect(inputs.builder);
stateHelper.setBuilderDriver(builder.driver ?? '');
stateHelper.setBuilderEndpoint(builder.nodes?.[0]?.endpoint ?? '');
core.info(JSON.stringify(builder, null, 2));
});
const args: string[] = await context.getArgs(inputs, toolkit); const args: string[] = await context.getArgs(inputs, toolkit);
core.debug(`context.getArgs: ${JSON.stringify(args)}`);
const buildCmd = await toolkit.buildx.getCommand(args); const buildCmd = await toolkit.buildx.getCommand(args);
core.debug(`buildCmd.command: ${buildCmd.command}`);
core.debug(`buildCmd.args: ${JSON.stringify(buildCmd.args)}`);
let err: Error | undefined;
await Exec.getExecOutput(buildCmd.command, buildCmd.args, { await Exec.getExecOutput(buildCmd.command, buildCmd.args, {
ignoreReturnCode: true ignoreReturnCode: true,
env: Object.assign({}, process.env, {
BUILDX_METADATA_WARNINGS: 'true'
}) as {
[key: string]: string;
}
}).then(res => { }).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) { if (res.exitCode != 0) {
throw new Error(`buildx failed with: ${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`); if (inputs.call && inputs.call === 'check' && res.stdout.length > 0) {
// checks warnings are printed to stdout: https://github.com/docker/buildx/pull/2647
// take the first line with the message summaryzing the warnings
err = new Error(res.stdout.split('\n')[0]?.trim());
} else if (res.stderr.length > 0) {
err = new Error(`buildx failed with: ${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`);
}
} }
}); });
const imageID = BuildxInputs.resolveBuildImageID(); const imageID = toolkit.buildxBuild.resolveImageID();
const metadata = BuildxInputs.resolveBuildMetadata(); const metadata = toolkit.buildxBuild.resolveMetadata();
const digest = BuildxInputs.resolveDigest(); const digest = toolkit.buildxBuild.resolveDigest(metadata);
if (imageID) { if (imageID) {
await core.group(`ImageID`, async () => { await core.group(`ImageID`, async () => {
core.info(imageID); core.info(imageID);
@ -100,17 +134,173 @@ actionsToolkit.run(
} }
if (metadata) { if (metadata) {
await core.group(`Metadata`, async () => { await core.group(`Metadata`, async () => {
core.info(metadata); const metadatadt = JSON.stringify(metadata, null, 2);
core.setOutput('metadata', metadata); core.info(metadatadt);
core.setOutput('metadata', metadatadt);
}); });
} }
let ref: string | undefined;
await core.group(`Reference`, async () => {
ref = await buildRef(toolkit, startedTime, inputs.builder);
if (ref) {
core.info(ref);
stateHelper.setBuildRef(ref);
} else {
core.info('No build reference found');
}
});
if (buildChecksAnnotationsEnabled()) {
const warnings = toolkit.buildxBuild.resolveWarnings(metadata);
if (ref && warnings && warnings.length > 0) {
const annotations = await Buildx.convertWarningsToGitHubAnnotations(warnings, [ref]);
core.debug(`annotations: ${JSON.stringify(annotations, null, 2)}`);
if (annotations && annotations.length > 0) {
await core.group(`Generating GitHub annotations (${annotations.length} build checks found)`, async () => {
for (const annotation of annotations) {
core.warning(annotation.message, annotation);
}
});
}
}
}
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 (!ref) {
core.info('Build summary requires a build reference');
} else {
core.info('Build summary supported!');
stateHelper.setSummarySupported();
}
});
if (err) {
throw err;
}
}, },
// post // post
async () => { async () => {
if (stateHelper.isSummarySupported) {
await core.group(`Generating build summary`, async () => {
try {
const recordUploadEnabled = buildRecordUploadEnabled();
let recordRetentionDays: number | undefined;
if (recordUploadEnabled) {
recordRetentionDays = buildRecordRetentionDays();
}
const buildxHistory = new BuildxHistory();
const exportRes = await buildxHistory.export({
refs: stateHelper.buildRef ? [stateHelper.buildRef] : [],
useContainer: buildExportLegacy()
});
core.info(`Build record written to ${exportRes.dockerbuildFilename} (${Util.formatFileSize(exportRes.dockerbuildSize)})`);
let uploadRes: UploadArtifactResponse | undefined;
if (recordUploadEnabled) {
uploadRes = await GitHub.uploadArtifact({
filename: exportRes.dockerbuildFilename,
mimeType: 'application/gzip',
retentionDays: recordRetentionDays
});
}
await GitHub.writeBuildSummary({
exportRes: exportRes,
uploadRes: uploadRes,
inputs: stateHelper.summaryInputs,
driver: stateHelper.builderDriver,
endpoint: stateHelper.builderEndpoint
});
} catch (e) {
core.warning(e.message);
}
});
}
if (stateHelper.tmpDir.length > 0) { if (stateHelper.tmpDir.length > 0) {
await core.group(`Removing temp folder ${stateHelper.tmpDir}`, async () => { await core.group(`Removing temp folder ${stateHelper.tmpDir}`, async () => {
fs.rmSync(stateHelper.tmpDir, {recursive: true}); try {
fs.rmSync(stateHelper.tmpDir, {recursive: true});
} catch (e) {
core.warning(`Failed to remove temp folder ${stateHelper.tmpDir}`);
}
}); });
} }
} }
); );
async function buildRef(toolkit: Toolkit, since: Date, builder?: string): Promise<string> {
// get ref from metadata file
const ref = toolkit.buildxBuild.resolveRef();
if (ref) {
return ref;
}
// otherwise, look for the very first build ref since the build has started
if (!builder) {
const currentBuilder = await toolkit.builder.inspect();
builder = currentBuilder.name;
}
const refs = Buildx.refs({
dir: Buildx.refsDir,
builderName: builder,
since: since
});
return Object.keys(refs).length > 0 ? Object.keys(refs)[0] : '';
}
function buildChecksAnnotationsEnabled(): boolean {
if (process.env.DOCKER_BUILD_CHECKS_ANNOTATIONS) {
return Util.parseBool(process.env.DOCKER_BUILD_CHECKS_ANNOTATIONS);
}
return true;
}
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) {
return Util.parseBool(process.env.DOCKER_BUILD_SUMMARY);
}
return true;
}
function buildRecordUploadEnabled(): boolean {
if (process.env.DOCKER_BUILD_RECORD_UPLOAD) {
return Util.parseBool(process.env.DOCKER_BUILD_RECORD_UPLOAD);
}
return true;
}
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;
}
if (val) {
const res = parseInt(val);
if (isNaN(res)) {
throw new Error(`Invalid build record retention days: ${val}`);
}
return res;
}
}
function buildExportLegacy(): boolean {
if (process.env.DOCKER_BUILD_EXPORT_LEGACY) {
return Util.parseBool(process.env.DOCKER_BUILD_EXPORT_LEGACY);
}
return false;
}

View File

@ -1,7 +1,70 @@
import * as core from '@actions/core'; import * as core from '@actions/core';
import {Build} from '@docker/actions-toolkit/lib/buildx/build';
import {Inputs} from './context';
export const tmpDir = process.env['STATE_tmpDir'] || ''; export const tmpDir = process.env['STATE_tmpDir'] || '';
export const builderDriver = process.env['STATE_builderDriver'] || '';
export const builderEndpoint = process.env['STATE_builderEndpoint'] || '';
export const summaryInputs = process.env['STATE_summaryInputs'] ? JSON.parse(process.env['STATE_summaryInputs']) : undefined;
export const buildRef = process.env['STATE_buildRef'] || '';
export const isSummarySupported = !!process.env['STATE_isSummarySupported'];
export function setTmpDir(tmpDir: string) { export function setTmpDir(tmpDir: string) {
core.saveState('tmpDir', tmpDir); core.saveState('tmpDir', tmpDir);
} }
export function setBuilderDriver(builderDriver: string) {
core.saveState('builderDriver', builderDriver);
}
export function setBuilderEndpoint(builderEndpoint: string) {
core.saveState('builderEndpoint', builderEndpoint);
}
export function setBuildRef(buildRef: string) {
core.saveState('buildRef', buildRef);
}
export function setSummarySupported() {
core.saveState('isSummarySupported', 'true');
}
export function setSummaryInputs(inputs: Inputs) {
const res = {};
for (const key of Object.keys(inputs)) {
if (key === 'github-token') {
continue;
}
const value: string | string[] | boolean = inputs[key];
if (typeof value === 'boolean' && !value) {
continue;
} else if (Array.isArray(value)) {
if (value.length === 0) {
continue;
} else if (key === 'secrets' && value.length > 0) {
const secretKeys: string[] = [];
for (const secret of value) {
try {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [skey, _] = Build.parseSecretKvp(secret, true);
secretKeys.push(skey);
} catch (err) {
// ignore invalid secret
}
}
if (secretKeys.length > 0) {
res[key] = secretKeys;
}
continue;
}
} else if (!value) {
continue;
}
res[key] = value;
}
core.saveState('summaryInputs', JSON.stringify(res));
}

12
test/lint.Dockerfile Normal file
View File

@ -0,0 +1,12 @@
frOM busybox as base
cOpy lint.Dockerfile .
from scratch
MAINTAINER moby@example.com
COPy --from=base \
/lint.Dockerfile \
/
CMD [ "echo", "Hello, Norway!" ]
CMD [ "echo", "Hello, Sweden!" ]
ENTRYPOINT my-program start

View File

@ -1,5 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM golang:alpine AS build
FROM --platform=$BUILDPLATFORM alpine AS build
ARG TARGETPLATFORM ARG TARGETPLATFORM
ARG BUILDPLATFORM ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" > /log RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" > /log
@ -12,7 +13,7 @@ RUN apk --update --no-cache add \
&& rm -rf /tmp/* /var/cache/apk/* && rm -rf /tmp/* /var/cache/apk/*
USER buildx USER buildx
RUN sudo chown buildx. /log RUN sudo chown buildx: /log
USER root USER root
FROM alpine FROM alpine

10924
yarn.lock

File diff suppressed because it is too large Load Diff