Compare commits

...

101 Commits

Author SHA1 Message Date
Tõnis Tiigi
64c9b14150
Merge pull request #1443 from crazy-max/update-dev-deps
update dev dependencies
2026-01-07 16:41:35 -08:00
CrazyMax
b035f368b0
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-01-07 16:17:58 +01:00
CrazyMax
607c92fb2b
fix lint issues
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-01-07 16:15:39 +01:00
CrazyMax
2fec442ac0
update jest config since 30.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-01-07 16:14:24 +01:00
CrazyMax
f91d05adaa
migrate eslint config to new format required since 9.0.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-01-07 16:12:56 +01:00
CrazyMax
c6a539d2f5
update dev dependencies
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-01-07 16:12:01 +01:00
CrazyMax
19e4966231
Merge pull request #1438 from docker/dependabot/github_actions/actions/cache-5
chore(deps): Bump actions/cache from 4 to 5
2026-01-07 16:07:27 +01:00
CrazyMax
01c006c5e0
Merge pull request #1434 from docker/dependabot/github_actions/actions/checkout-6
chore(deps): Bump actions/checkout from 5 to 6
2026-01-07 16:07:09 +01:00
dependabot[bot]
2a7a5fe65d
chore(deps): Bump actions/cache from 4 to 5
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-12 11:01:05 +00:00
dependabot[bot]
56acb03b80
chore(deps): Bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-21 11:01:55 +00:00
CrazyMax
9e436ba9f2
Merge pull request #1413 from osman-butt/docs/update-checkout-v5
docs: update checkout action to v5 in README examples
2025-09-29 12:15:59 +02:00
osman-butt
62929198b5 docs: update checkout action to v5 in README
Signed-off-by: osman-butt <butt.osman@gmail.com>
2025-09-06 00:04:00 +02:00
CrazyMax
cb8fc7586f
Merge pull request #1411 from docker/update-e2e
ci: update harbor and distribution to latest
2025-09-05 12:13:31 +02:00
CrazyMax
5225a9fc21
ci: update harbor and distribution to latest
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-09-05 12:07:59 +02:00
CrazyMax
ccc2b40e9e
Merge pull request #1402 from docker/dependabot/github_actions/actions/checkout-5
chore(deps): Bump actions/checkout from 4 to 5
2025-08-21 11:14:53 +02:00
dependabot[bot]
5dd7b9db36
chore(deps): Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 18:53:24 +00:00
CrazyMax
55146d969b
Merge pull request #1391 from docker/dependabot/npm_and_yarn/form-data-2.5.5
chore(deps): Bump form-data from 2.5.1 to 2.5.5
2025-08-05 15:17:00 +02:00
dependabot[bot]
24e9b7e65f
chore(deps): Bump form-data from 2.5.1 to 2.5.5
---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 2.5.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-21 23:10:01 +00:00
CrazyMax
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
CrazyMax
c0432d2e01
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-27 18:24:03 +02:00
CrazyMax
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
dependabot[bot]
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
CrazyMax
0788c444d8
Merge pull request #1375 from crazy-max/remove-gcr
e2e: remove GCR
2025-05-15 15:48:50 +02:00
CrazyMax
aa179ca4f4
e2e: remove GCR
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-15 15:02:58 +02:00
CrazyMax
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
CrazyMax
9c9803f364
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-13 13:34:30 +02:00
CrazyMax
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
CrazyMax
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
CrazyMax
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
CrazyMax
0ec91264d8
Merge pull request #1366 from crazy-max/pr-assign-author
pr-assign-author workflow
2025-04-23 16:10:45 +02:00
CrazyMax
b749522b90
pr-assign-author workflow
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-04-23 14:15:19 +02:00
CrazyMax
c566248492
Merge pull request #1363 from crazy-max/fix-codecov
ci: fix missing source for codecov
2025-04-22 14:23:11 +02:00
CrazyMax
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
CrazyMax
67dc78bbaf
Merge pull request #1361 from mschoettle/patch-1
docs: add validating build configuration example
2025-04-17 17:12:36 +02:00
Matthias Schoettle
0760504437
docs: add validating build configuration example
Signed-off-by: Matthias Schoettle <git@mattsch.com>
2025-04-17 10:14:30 -04:00
CrazyMax
1c198f4467
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-04-09 18:58:46 +02:00
CrazyMax
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
CrazyMax
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
CrazyMax
1be4244e8d
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-04-09 13:28:49 +02:00
CrazyMax
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
CrazyMax
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
CrazyMax
91838c2ba3
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-04-08 17:47:27 +02:00
dependabot[bot]
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
CrazyMax
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
k-kbk
8ea72f78e8 chore: update dist
Signed-off-by: k-kbk <kkbk0077@gmail.com>
2025-04-01 23:28:50 +09:00
Bokyeom
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
CrazyMax
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
CrazyMax
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
CrazyMax
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
CrazyMax
b89ff0a6f2
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-02-26 15:27:47 +01:00
dependabot[bot]
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
CrazyMax
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
CrazyMax
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
CrazyMax
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
CrazyMax
d88cd289df
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-02-19 15:28:34 +01:00
dependabot[bot]
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
CrazyMax
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
CrazyMax
d2fe919bb5
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-01-24 10:19:21 +01:00
dependabot[bot]
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
CrazyMax
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
CrazyMax
0b1b1c9c43
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-01-15 13:44:43 +01:00
dependabot[bot]
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
CrazyMax
31ca4e5d51
Merge pull request #1296 from crazy-max/bake-v6
update bake-action to v6
2025-01-08 18:54:38 +01:00
CrazyMax
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
CrazyMax
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
CrazyMax
594bf46f0f
Merge pull request #1294 from crazy-max/fix-e2e
ci(e2e): fix setup docker config
2025-01-08 10:14:00 +01:00
CrazyMax
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
CrazyMax
e6478a2405
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-01-08 10:02:55 +01:00
dependabot[bot]
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
CrazyMax
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
CrazyMax
7e094594be
Merge pull request #1282 from crazy-max/remove-buildkit-5561
Revert "init buildkit-5561 workflow"
2024-12-17 16:32:34 +01:00
CrazyMax
32ee877a58
Revert "init buildkit-5561 workflow"
This reverts commit f5a8591a7ff7468794d6a699b95c45220ef644f9.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-12-17 16:26:04 +01:00
CrazyMax
d1a4129c41
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-12-17 16:25:57 +01:00
CrazyMax
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
CrazyMax
bcc9f4afe7
Merge pull request #1284 from crazy-max/dockerfiles-pin-bases
test: fix multi-sudo dockerfile
2024-12-17 16:18:44 +01:00
CrazyMax
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
CrazyMax
11be14d908
Merge pull request #1274 from crazy-max/init-buildkit-5561
init buildkit-5561 workflow
2024-12-05 15:27:22 +01:00
CrazyMax
f5a8591a7f
init buildkit-5561 workflow
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-12-05 15:21:59 +01:00
CrazyMax
8796455d32
Merge pull request #1272 from crazy-max/update-readme
readme: move login step up
2024-12-03 16:04:51 +01:00
CrazyMax
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
CrazyMax
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
CrazyMax
678328cf8e
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-26 11:17:24 +01:00
dependabot[bot]
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
CrazyMax
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
CrazyMax
c333dfd43d
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-26 11:12:04 +01:00
dependabot[bot]
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
CrazyMax
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
CrazyMax
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
CrazyMax
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
CrazyMax
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
CrazyMax
22cd91d73b
Merge pull request #1266 from crazy-max/update-trbsht
update troubleshooting markdown
2024-11-26 10:14:48 +01:00
CrazyMax
6bdcc4fb8c
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-26 01:30:39 +01:00
CrazyMax
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
CrazyMax
325a8bf0f1
update troubleshooting markdown
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-26 01:12:56 +01:00
Shaun Thompson
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
CrazyMax
1b8e4efb78
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-25 18:38:40 +01:00
CrazyMax
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
dependabot[bot]
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
dependabot[bot]
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
CrazyMax
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
CrazyMax
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
27 changed files with 2549 additions and 1958 deletions

View File

@ -1,3 +0,0 @@
/dist/**
/coverage/**
/node_modules/**

View File

@ -1,24 +0,0 @@
{
"env": {
"node": true,
"es6": true,
"jest": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2023,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"jest",
"prettier"
]
}

View File

@ -76,6 +76,7 @@ until $(curl --output /dev/null --silent --head --fail "http://$NEXUS_HOST:$NEXU
printf '.' printf '.'
sleep 5 sleep 5
done done
echo "ready!"
echo "::endgroup::" echo "::endgroup::"
echo "::group::Change user's password" echo "::group::Change user's password"

View File

@ -27,9 +27,9 @@ on:
type: string type: string
env: env:
HARBOR_VERSION: v2.7.0 HARBOR_VERSION: v2.13.2
NEXUS_VERSION: 3.47.1 NEXUS_VERSION: 3.47.1
DISTRIBUTION_VERSION: 2.8.1 DISTRIBUTION_VERSION: 3.0.0
jobs: jobs:
run: run:
@ -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
@ -47,7 +50,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up env name: Set up env
if: inputs.type == 'local' if: inputs.type == 'local'
@ -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 }}

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:
@ -33,7 +33,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
path: action path: action
- -
@ -59,7 +59,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
path: action path: action
- -
@ -108,7 +108,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
path: action path: action
- -
@ -167,7 +167,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
@ -216,7 +216,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Docker meta name: Docker meta
id: meta id: meta
@ -272,7 +272,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Stop docker name: Stop docker
run: | run: |
@ -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
@ -299,7 +298,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
@ -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
@ -340,7 +338,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Build name: Build
id: docker_build id: docker_build
@ -356,7 +354,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Build name: Build
uses: ./ uses: ./
@ -375,7 +373,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -398,7 +396,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up Docker buildx name: Set up Docker buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -423,7 +421,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -447,7 +445,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -469,7 +467,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -494,7 +492,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -517,7 +515,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -542,7 +540,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -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
@ -576,7 +576,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -619,7 +619,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -671,7 +671,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -723,7 +723,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
@ -792,7 +792,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -862,7 +862,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
@ -911,7 +911,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
@ -952,7 +952,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
@ -967,7 +967,7 @@ jobs:
buildkitd-flags: --debug buildkitd-flags: --debug
- -
name: Cache Build name: Cache Build
uses: actions/cache@v4 uses: actions/cache@v5
with: with:
path: /tmp/.buildx-cache path: /tmp/.buildx-cache
key: ${{ runner.os }}-local-test-${{ github.sha }} key: ${{ runner.os }}-local-test-${{ github.sha }}
@ -1004,7 +1004,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Uninstall docker cli name: Uninstall docker cli
run: | run: |
@ -1033,7 +1033,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -1055,7 +1055,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -1089,7 +1089,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -1120,7 +1120,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set malformed docker config name: Set malformed docker config
run: | run: |
@ -1147,7 +1147,7 @@ jobs:
curl --retry 5 --retry-all-errors --retry-delay 0 --connect-timeout 5 --proxy http://127.0.0.1:3128 -v --insecure --head https://www.google.com curl --retry 5 --retry-all-errors --retry-delay 0 --connect-timeout 5 --proxy http://127.0.0.1:3128 -v --insecure --head https://www.google.com
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set proxy config name: Set proxy config
run: | run: |
@ -1184,7 +1184,7 @@ jobs:
curl --retry 5 --retry-all-errors --retry-delay 0 --connect-timeout 5 --proxy http://127.0.0.1:3128 -v --insecure --head https://www.google.com curl --retry 5 --retry-all-errors --retry-delay 0 --connect-timeout 5 --proxy http://127.0.0.1:3128 -v --insecure --head https://www.google.com
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -1215,7 +1215,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Docker meta name: Docker meta
id: meta id: meta
@ -1265,7 +1265,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
@ -1314,7 +1314,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
@ -1350,7 +1350,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
path: action path: action
- -
@ -1373,7 +1373,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
path: action path: action
- -
@ -1396,7 +1396,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
path: action path: action
- -
@ -1417,7 +1417,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
path: action path: action
- -
@ -1446,7 +1446,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
path: action path: action
- -
@ -1464,18 +1464,48 @@ jobs:
env: env:
DOCKER_BUILD_RECORD_RETENTION_DAYS: ${{ matrix.days }} 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@v6
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: checks:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
buildx-version: buildx-version:
- edge
- latest - latest
- v0.14.1 - v0.14.1
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -1495,7 +1525,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -1511,3 +1541,56 @@ jobs:
file: ./test/lint.Dockerfile file: ./test/lint.Dockerfile
env: env:
DOCKER_BUILD_CHECKS_ANNOTATIONS: false DOCKER_BUILD_CHECKS_ANNOTATIONS: false
call-check:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v6
-
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@v6
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

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@v6
-
name: Publish
uses: actions/publish-immutable-action@v0.0.4

View File

@ -17,15 +17,16 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Test name: Test
uses: docker/bake-action@v5 uses: docker/bake-action@v6
with: with:
source: .
targets: test targets: test
- -
name: Upload coverage name: Upload coverage
uses: codecov/codecov-action@v4 uses: codecov/codecov-action@v5
with: with:
file: ./coverage/clover.xml files: ./coverage/clover.xml
token: ${{ secrets.CODECOV_TOKEN }} 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@v6
- -
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@v5 uses: docker/bake-action@v6
with: with:
targets: ${{ matrix.target }} targets: ${{ matrix.target }}

View File

@ -60,18 +60,18 @@ 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@v6 uses: docker/build-push-action@v6
@ -131,19 +131,19 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
-
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@v6 uses: docker/build-push-action@v6
@ -162,6 +162,7 @@ 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/)
@ -185,6 +186,19 @@ additional details about the build, including build stats, logs, outputs, and
more. The build record can be imported to Docker Desktop for inspecting the more. The build record can be imported to Docker Desktop for inspecting the
build in greater detail. 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 Summaries are enabled by default, but can be disabled with the
`DOCKER_BUILD_SUMMARY` [environment variable](#environment-variables). `DOCKER_BUILD_SUMMARY` [environment variable](#environment-variables).
@ -220,6 +234,7 @@ The 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`) |
@ -262,6 +277,7 @@ The following outputs are available:
| `DOCKER_BUILD_SUMMARY` | Bool | `true` | If `false`, [build summary](https://docs.docker.com/build/ci/github-actions/build-summary/) generation is disabled | | `DOCKER_BUILD_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_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_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

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
@ -136,29 +135,3 @@ Or a dedicated step to sanitize the slug:
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,4 +1,4 @@
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';
@ -68,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_')) {
@ -76,6 +77,9 @@ describe('getArgs', () => {
return object; return object;
}, {}); }, {});
}); });
afterEach(() => {
process.env = originalEnv;
});
// prettier-ignore // prettier-ignore
test.each([ test.each([
@ -93,7 +97,8 @@ describe('getArgs', () => {
'build', 'build',
'--iidfile', imageIDFilePath, '--iidfile', imageIDFilePath,
'.' '.'
] ],
undefined
], ],
[ [
1, 1,
@ -116,7 +121,8 @@ ccc"`],
'--build-arg', `MULTILINE=aaaa\nbbbb\nccc`, '--build-arg', `MULTILINE=aaaa\nbbbb\nccc`,
'--iidfile', imageIDFilePath, '--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,
@ -134,7 +140,8 @@ ccc"`],
'--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,
@ -154,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,
@ -171,7 +179,8 @@ ccc"`],
'build', 'build',
'--platform', 'linux/amd64,linux/arm64', '--platform', 'linux/amd64,linux/arm64',
'.' '.'
] ],
undefined
], ],
[ [
5, 5,
@ -187,7 +196,8 @@ ccc"`],
'build', 'build',
'--iidfile', imageIDFilePath, '--iidfile', imageIDFilePath,
'.' '.'
] ],
undefined
], ],
[ [
6, 6,
@ -205,7 +215,8 @@ ccc"`],
'--iidfile', imageIDFilePath, '--iidfile', imageIDFilePath,
'--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`, '--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`,
'.' '.'
] ],
undefined
], ],
[ [
7, 7,
@ -223,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,
@ -249,7 +261,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
], ],
[ [
9, 9,
@ -286,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,
@ -323,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,
@ -349,7 +364,8 @@ ccc`],
'--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,
@ -369,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,
@ -395,7 +412,8 @@ ccc`],
'--network', 'host', '--network', 'host',
'--push', '--push',
'.' '.'
] ],
undefined
], ],
[ [
14, 14,
@ -425,7 +443,8 @@ nproc=3`],
'--ulimit', 'nproc=3', '--ulimit', 'nproc=3',
'--metadata-file', metadataJson, '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
15, 15,
@ -442,7 +461,8 @@ nproc=3`],
'--iidfile', imageIDFilePath, '--iidfile', imageIDFilePath,
'--metadata-file', metadataJson, '--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,
@ -461,7 +481,8 @@ nproc=3`],
'--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`, '--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`,
'--metadata-file', metadataJson, '--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,
@ -479,7 +500,8 @@ nproc=3`],
'--iidfile', imageIDFilePath, '--iidfile', imageIDFilePath,
'--metadata-file', metadataJson, '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
18, 18,
@ -497,7 +519,8 @@ nproc=3`],
'--attest', `type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`, '--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, '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
19, 19,
@ -516,7 +539,8 @@ nproc=3`],
'--attest', `type=provenance,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`, '--attest', `type=provenance,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`,
'--metadata-file', metadataJson, '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
20, 20,
@ -535,7 +559,8 @@ nproc=3`],
'--attest', `type=provenance,mode=max,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`, '--attest', `type=provenance,mode=max,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`,
'--metadata-file', metadataJson, '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
21, 21,
@ -554,7 +579,8 @@ nproc=3`],
'--attest', 'type=provenance,disabled=true', '--attest', 'type=provenance,disabled=true',
'--metadata-file', metadataJson, '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
22, 22,
@ -573,7 +599,8 @@ nproc=3`],
'--attest', 'type=provenance,builder-id=foo', '--attest', 'type=provenance,builder-id=foo',
'--metadata-file', metadataJson, '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
23, 23,
@ -592,7 +619,8 @@ nproc=3`],
"--output", 'type=docker', "--output", 'type=docker',
'--metadata-file', metadataJson, '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
24, 24,
@ -610,7 +638,8 @@ nproc=3`],
'--load', '--load',
'--metadata-file', metadataJson, '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
25, 25,
@ -630,7 +659,8 @@ nproc=3`],
'--load', '--load',
'--metadata-file', metadataJson, '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
26, 26,
@ -652,7 +682,8 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`]
'--load', '--load',
'--metadata-file', metadataJson, '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
27, 27,
@ -673,7 +704,8 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`]
'--load', '--load',
'--metadata-file', metadataJson, '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
28, 28,
@ -693,7 +725,8 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`]
'--attest', `type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`, '--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, '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
29, 29,
@ -717,7 +750,8 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`]
'--attest', `type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`, '--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, '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
30, 30,
@ -737,7 +771,8 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`]
'--attest', `type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`, '--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, '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
31, 31,
@ -758,7 +793,8 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`]
'--attest', `type=sbom,disabled=false`, '--attest', `type=sbom,disabled=false`,
'--metadata-file', metadataJson, '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
32, 32,
@ -778,7 +814,8 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`]
'--attest', `type=provenance,mode=max,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`, '--attest', `type=provenance,mode=max,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`,
'--metadata-file', metadataJson, '--metadata-file', metadataJson,
'.' '.'
] ],
undefined
], ],
[ [
33, 33,
@ -797,11 +834,37 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`]
'--attest', `type=provenance,mode=min,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`, '--attest', `type=provenance,mode=min,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`,
'--metadata-file', metadataJson, '--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

42
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

6
dist/licenses.txt generated vendored
View File

@ -2358,9 +2358,6 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
dot-object
MIT
encoding encoding
MIT MIT
Copyright (c) 2012-2014 Andris Reinman Copyright (c) 2012-2014 Andris Reinman
@ -3691,9 +3688,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
twirp-ts
MIT
undici undici
MIT MIT
MIT License MIT License

2
dist/sourcemap-register.js generated vendored

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,9 @@
target "_common" {
args = {
BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1
}
}
group "default" { group "default" {
targets = ["build"] targets = ["build"]
} }
@ -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" { 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"]

58
eslint.config.js Normal file
View File

@ -0,0 +1,58 @@
/* eslint-disable @typescript-eslint/no-require-imports */
const {defineConfig, globalIgnores} = require('eslint/config');
const {fixupConfigRules, fixupPluginRules} = require('@eslint/compat');
const typescriptEslint = require('@typescript-eslint/eslint-plugin');
const jestPlugin = require('eslint-plugin-jest');
const prettier = require('eslint-plugin-prettier');
const globals = require('globals');
const tsParser = require('@typescript-eslint/parser');
const js = require('@eslint/js');
const {FlatCompat} = require('@eslint/eslintrc');
// __dirname and __filename exist natively in CommonJS
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});
module.exports = defineConfig([
globalIgnores(['dist/**/*', 'coverage/**/*', 'node_modules/**/*']),
{
// prettier-ignore
extends: fixupConfigRules(
compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:jest/recommended',
'plugin:prettier/recommended'
)
),
plugins: {
'@typescript-eslint': fixupPluginRules(typescriptEslint),
jest: fixupPluginRules(jestPlugin),
prettier: fixupPluginRules(prettier)
},
languageOptions: {
globals: {
...globals.node,
...globals.jest
},
parser: tsParser,
ecmaVersion: 'latest',
sourceType: 'module'
},
rules: {
'@typescript-eslint/no-require-imports': [
'error',
{
allowAsImport: true
}
]
}
}
]);

View File

@ -1,6 +1,7 @@
import fs from 'fs'; /* eslint-disable @typescript-eslint/no-require-imports */
import os from 'os'; const fs = require('fs');
import path from 'path'; const os = require('os');
const path = require('path');
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-build-push-action-')); const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-build-push-action-'));
@ -9,9 +10,7 @@ process.env = Object.assign({}, process.env, {
GITHUB_REPOSITORY: 'docker/build-push-action', GITHUB_REPOSITORY: 'docker/build-push-action',
RUNNER_TEMP: path.join(tmpDir, 'runner-temp'), RUNNER_TEMP: path.join(tmpDir, 'runner-temp'),
RUNNER_TOOL_CACHE: path.join(tmpDir, 'runner-tool-cache') RUNNER_TOOL_CACHE: path.join(tmpDir, 'runner-tool-cache')
}) as { });
[key: string]: string;
};
module.exports = { module.exports = {
clearMocks: false, clearMocks: false,

View File

@ -26,23 +26,26 @@
"license": "Apache-2.0", "license": "Apache-2.0",
"packageManager": "yarn@3.6.3", "packageManager": "yarn@3.6.3",
"dependencies": { "dependencies": {
"@actions/core": "^1.10.1", "@actions/core": "^1.11.1",
"@docker/actions-toolkit": "0.39.0", "@docker/actions-toolkit": "0.62.1",
"handlebars": "^4.7.7" "handlebars": "^4.7.7"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.12.12", "@eslint/compat": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^7.9.0", "@eslint/eslintrc": "^3.3.3",
"@typescript-eslint/parser": "^7.9.0", "@eslint/js": "^9.39.2",
"@vercel/ncc": "^0.38.1", "@types/node": "^20.19.27",
"eslint": "^8.57.0", "@typescript-eslint/eslint-plugin": "^8.50.0",
"eslint-config-prettier": "^9.1.0", "@typescript-eslint/parser": "^8.50.0",
"eslint-plugin-jest": "^28.5.0", "@vercel/ncc": "^0.38.4",
"eslint-plugin-prettier": "^5.1.3", "eslint": "^9.39.2",
"jest": "^29.7.0", "eslint-config-prettier": "^10.1.8",
"prettier": "^3.2.5", "eslint-plugin-jest": "^29.5.0",
"ts-jest": "^29.1.2", "eslint-plugin-prettier": "^5.5.4",
"jest": "^30.2.0",
"prettier": "^3.7.4",
"ts-jest": "^29.4.6",
"ts-node": "^10.9.2", "ts-node": "^10.9.2",
"typescript": "^5.4.5" "typescript": "^5.9.3"
} }
} }

View File

@ -17,6 +17,7 @@ export interface Inputs {
builder: string; builder: string;
'cache-from': string[]; 'cache-from': string[];
'cache-to': string[]; 'cache-to': string[];
call: string;
'cgroup-parent': string; 'cgroup-parent': string;
context: string; context: string;
file: string; file: string;
@ -53,6 +54,7 @@ export async function getInputs(): Promise<Inputs> {
builder: core.getInput('builder'), builder: core.getInput('builder'),
'cache-from': Util.getInputList('cache-from', {ignoreComma: true}), 'cache-from': Util.getInputList('cache-from', {ignoreComma: true}),
'cache-to': Util.getInputList('cache-to', {ignoreComma: true}), 'cache-to': Util.getInputList('cache-to', {ignoreComma: true}),
call: core.getInput('call'),
'cgroup-parent': core.getInput('cgroup-parent'), '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'),
@ -79,25 +81,6 @@ export async function getInputs(): Promise<Inputs> {
}; };
} }
export function sanitizeInputs(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 === false) {
continue;
} else if (Array.isArray(value) && value.length === 0) {
continue;
} else if (!value) {
continue;
}
res[key] = value;
}
return res;
}
export async function getArgs(inputs: Inputs, toolkit: Toolkit): Promise<Array<string>> { export async function getArgs(inputs: Inputs, toolkit: Toolkit): Promise<Array<string>> {
const context = handlebars.compile(inputs.context)({ const context = handlebars.compile(inputs.context)({
defaultContext: Context.gitContext() defaultContext: Context.gitContext()
@ -115,9 +98,9 @@ async function getBuildArgs(inputs: Inputs, context: string, toolkit: Toolkit):
await Util.asyncForEach(inputs['add-hosts'], 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.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);
@ -130,7 +113,12 @@ async function getBuildArgs(inputs: Inputs, context: string, toolkit: Toolkit):
}); });
if (await toolkit.buildx.versionSatisfies('>=0.8.0')) { if (await toolkit.buildx.versionSatisfies('>=0.8.0')) {
await Util.asyncForEach(inputs['build-contexts'], 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) { } 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."); core.warning("Build contexts are only supported by buildx >= 0.8.0; the input 'build-contexts' is ignored.");
@ -141,6 +129,12 @@ async function getBuildArgs(inputs: Inputs, context: string, toolkit: Toolkit):
await Util.asyncForEach(inputs['cache-to'], async cacheTo => { await Util.asyncForEach(inputs['cache-to'], async cacheTo => {
args.push('--cache-to', cacheTo); args.push('--cache-to', cacheTo);
}); });
if (inputs.call) {
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);
}
if (inputs['cgroup-parent']) { if (inputs['cgroup-parent']) {
args.push('--cgroup-parent', inputs['cgroup-parent']); args.push('--cgroup-parent', inputs['cgroup-parent']);
} }
@ -251,7 +245,7 @@ async function getAttestArgs(inputs: Inputs, toolkit: Toolkit): Promise<Array<st
if (inputs.provenance) { if (inputs.provenance) {
args.push('--attest', Build.resolveAttestationAttrs(`type=provenance,${inputs.provenance}`)); args.push('--attest', Build.resolveAttestationAttrs(`type=provenance,${inputs.provenance}`));
provenanceSet = true; provenanceSet = true;
} else if (!hasAttestProvenance && (await toolkit.buildkit.versionSatisfies(inputs.builder, '>=0.11.0')) && !Build.hasDockerExporter(inputs.outputs, inputs.load)) { } 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 // if provenance not specified in provenance or attests inputs and BuildKit
// version compatible for attestation, set default provenance. Also needs // version compatible for attestation, set default provenance. Also needs
// to make sure user doesn't want to explicitly load the image to docker. // to make sure user doesn't want to explicitly load the image to docker.
@ -283,3 +277,10 @@ async function getAttestArgs(inputs: Inputs, toolkit: Toolkit): Promise<Array<st
return args; 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

@ -24,8 +24,8 @@ actionsToolkit.run(
async () => { async () => {
const startedTime = new Date(); 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)}`); core.debug(`inputs: ${JSON.stringify(inputs)}`);
stateHelper.setInputs(inputs);
const toolkit = new Toolkit(); const toolkit = new Toolkit();
@ -85,6 +85,8 @@ actionsToolkit.run(
let builder: BuilderInfo; let builder: BuilderInfo;
await core.group(`Builder info`, async () => { await core.group(`Builder info`, async () => {
builder = await toolkit.builder.inspect(inputs.builder); builder = await toolkit.builder.inspect(inputs.builder);
stateHelper.setBuilderDriver(builder.driver ?? '');
stateHelper.setBuilderEndpoint(builder.nodes?.[0]?.endpoint ?? '');
core.info(JSON.stringify(builder, null, 2)); core.info(JSON.stringify(builder, null, 2));
}); });
@ -104,8 +106,14 @@ actionsToolkit.run(
[key: string]: string; [key: string]: string;
} }
}).then(res => { }).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) { if (res.exitCode != 0) {
err = 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'}`);
}
} }
}); });
@ -161,12 +169,12 @@ actionsToolkit.run(
await core.group(`Check build summary support`, async () => { await core.group(`Check build summary support`, async () => {
if (!buildSummaryEnabled()) { if (!buildSummaryEnabled()) {
core.info('Build summary disabled'); 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) { } else if (GitHub.isGHES) {
core.info('Build summary is not yet supported on GHES'); core.info('Build summary is not yet supported on GHES');
} else if (!(await toolkit.buildx.versionSatisfies('>=0.13.0'))) { } else if (!(await toolkit.buildx.versionSatisfies('>=0.13.0'))) {
core.info('Build summary requires Buildx >= 0.13.0'); core.info('Build summary requires Buildx >= 0.13.0');
} else if (builder && builder.driver === 'cloud') {
core.info('Build summary is not yet supported with Docker Build Cloud');
} else if (!ref) { } else if (!ref) {
core.info('Build summary requires a build reference'); core.info('Build summary requires a build reference');
} else { } else {
@ -192,7 +200,8 @@ actionsToolkit.run(
const buildxHistory = new BuildxHistory(); const buildxHistory = new BuildxHistory();
const exportRes = await buildxHistory.export({ const exportRes = await buildxHistory.export({
refs: stateHelper.buildRef ? [stateHelper.buildRef] : [] refs: stateHelper.buildRef ? [stateHelper.buildRef] : [],
useContainer: buildExportLegacy()
}); });
core.info(`Build record written to ${exportRes.dockerbuildFilename} (${Util.formatFileSize(exportRes.dockerbuildSize)})`); core.info(`Build record written to ${exportRes.dockerbuildFilename} (${Util.formatFileSize(exportRes.dockerbuildSize)})`);
@ -208,7 +217,9 @@ actionsToolkit.run(
await GitHub.writeBuildSummary({ await GitHub.writeBuildSummary({
exportRes: exportRes, exportRes: exportRes,
uploadRes: uploadRes, uploadRes: uploadRes,
inputs: stateHelper.inputs inputs: stateHelper.summaryInputs,
driver: stateHelper.builderDriver,
endpoint: stateHelper.builderEndpoint
}); });
} catch (e) { } catch (e) {
core.warning(e.message); core.warning(e.message);
@ -217,7 +228,11 @@ actionsToolkit.run(
} }
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 () => {
try {
fs.rmSync(stateHelper.tmpDir, {recursive: true}); fs.rmSync(stateHelper.tmpDir, {recursive: true});
} catch {
core.warning(`Failed to remove temp folder ${stateHelper.tmpDir}`);
}
}); });
} }
} }
@ -277,8 +292,15 @@ function buildRecordRetentionDays(): number | undefined {
if (val) { if (val) {
const res = parseInt(val); const res = parseInt(val);
if (isNaN(res)) { if (isNaN(res)) {
throw Error(`Invalid build record retention days: ${val}`); throw new Error(`Invalid build record retention days: ${val}`);
} }
return res; 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,9 +1,15 @@
import * as core from '@actions/core'; import * as core from '@actions/core';
import {Inputs, sanitizeInputs} from './context'; 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 inputs = process.env['STATE_inputs'] ? JSON.parse(process.env['STATE_inputs']) : undefined;
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 buildRef = process.env['STATE_buildRef'] || '';
export const isSummarySupported = !!process.env['STATE_isSummarySupported']; export const isSummarySupported = !!process.env['STATE_isSummarySupported'];
@ -11,8 +17,12 @@ export function setTmpDir(tmpDir: string) {
core.saveState('tmpDir', tmpDir); core.saveState('tmpDir', tmpDir);
} }
export function setInputs(inputs: Inputs) { export function setBuilderDriver(builderDriver: string) {
core.saveState('inputs', JSON.stringify(sanitizeInputs(inputs))); core.saveState('builderDriver', builderDriver);
}
export function setBuilderEndpoint(builderEndpoint: string) {
core.saveState('builderEndpoint', builderEndpoint);
} }
export function setBuildRef(buildRef: string) { export function setBuildRef(buildRef: string) {
@ -22,3 +32,39 @@ export function setBuildRef(buildRef: string) {
export function setSummarySupported() { export function setSummarySupported() {
core.saveState('isSummarySupported', 'true'); 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 {
// ignore invalid secret
}
}
if (secretKeys.length > 0) {
res[key] = secretKeys;
}
continue;
}
} else if (!value) {
continue;
}
res[key] = value;
}
core.saveState('summaryInputs', JSON.stringify(res));
}

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

3698
yarn.lock

File diff suppressed because it is too large Load Diff