Compare commits

..
58 Commits
Author SHA1 Message Date
CrazyMax b5ca514318 Merge pull request #408 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.56.0
ci / error (push) Failing after 4s
ci / debug (push) Failing after 4s
ci / main () (push) Successful in 9s
ci / with-qemu (, all) (push) Failing after 4s
ci / main (v0.4.1) (push) Successful in 10s
ci / with-qemu (v0.9.1, all) (push) Failing after 4s
ci / with-qemu (v0.9.1, arm64,riscv64,arm) (push) Failing after 4s
ci / install (push) Successful in 10s
ci / with-qemu (, arm64,riscv64,arm) (push) Failing after 5s
ci / use (false) (push) Successful in 10s
ci / docker-driver (push) Successful in 8s
ci / use (true) (push) Successful in 11s
ci / driver (image=moby/buildkit:latest) (push) Successful in 10s
ci / driver (image=moby/buildkit:master network=host ) (push) Successful in 9s
ci / main (latest) (push) Successful in 14s
ci / multi (push) Successful in 14s
ci / endpoint (push) Failing after 11s
ci / platforms (push) Failing after 5s
ci / docker-context (push) Successful in 7s
ci / standalone-install-error (push) Successful in 10s
ci / cleanup (false) (push) Successful in 10s
ci / standalone-cmd (push) Successful in 12s
ci / cleanup (true) (push) Successful in 11s
ci / append (push) Successful in 11s
ci / cache-binary (false) (push) Successful in 11s
ci / standalone-action (push) Successful in 13s
ci / config (push) Successful in 1m7s
ci / config-inline (push) Successful in 1m29s
ci / main (cloud:v0.11.2-desktop.2) (push) Successful in 9m30s
ci / main (cloud:latest) (push) Successful in 9m35s
ci / main (lab:latest) (push) Successful in 9m35s
ci / build-ref (cb185f095fd3d9444e0aa605d3789e9e05f2a1e7) (push) Successful in 9m37s
ci / build-ref (master) (push) Successful in 9m37s
ci / build-ref (refs/tags/v0.5.1) (push) Successful in 9m36s
ci / build-ref (refs/pull/731/head) (push) Successful in 9m36s
ci / cache-binary (true) (push) Successful in 9m38s
ci / k3s (v0.10.5) (push) Canceled after 0s
ci / k3s (v0.11.0) (push) Canceled after 0s
build(deps): bump @docker/actions-toolkit from 0.54.0 to 0.56.0
2025-02-26 15:35:00 +01:00
CrazyMax 1418a4ef33 chore: update generated content
Signed-off-by: CrazyMax <[email protected]>
2025-02-26 15:32:43 +01:00
dependabot[bot] 93acf831ce build(deps): bump @docker/actions-toolkit from 0.54.0 to 0.56.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.54.0 to 0.56.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.54.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] <[email protected]>
2025-02-26 14:25:44 +00:00
CrazyMax f7ce87c1d6 Merge pull request #404 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.54.0
ci / error (push) Failing after 4s
ci / debug (push) Failing after 3s
ci / main () (push) Successful in 13s
ci / main (lab:latest) (push) Successful in 11s
ci / main (v0.4.1) (push) Successful in 11s
ci / main (latest) (push) Successful in 14s
ci / with-qemu (, arm64,riscv64,arm) (push) Failing after 4s
ci / with-qemu (, all) (push) Failing after 5s
ci / multi (push) Successful in 15s
ci / with-qemu (v0.9.1, arm64,riscv64,arm) (push) Failing after 4s
ci / use (true) (push) Successful in 10s
ci / driver (image=moby/buildkit:master network=host ) (push) Successful in 11s
ci / with-qemu (v0.9.1, all) (push) Failing after 6s
ci / docker-driver (push) Successful in 12s
ci / use (false) (push) Successful in 13s
ci / driver (image=moby/buildkit:latest) (push) Successful in 12s
ci / install (push) Successful in 14s
ci / endpoint (push) Failing after 12s
ci / platforms (push) Failing after 4s
ci / config (push) Successful in 14s
ci / config-inline (push) Successful in 16s
ci / standalone-install-error (push) Successful in 11s
ci / append (push) Successful in 11s
ci / docker-context (push) Successful in 10s
ci / standalone-action (push) Successful in 13s
ci / cleanup (true) (push) Successful in 11s
ci / standalone-cmd (push) Successful in 15s
ci / cache-binary (false) (push) Successful in 13s
ci / cleanup (false) (push) Successful in 13s
ci / cache-binary (true) (push) Successful in 13s
ci / main (cloud:v0.11.2-desktop.2) (push) Successful in 9m28s
ci / main (cloud:latest) (push) Successful in 9m29s
ci / build-ref (cb185f095fd3d9444e0aa605d3789e9e05f2a1e7) (push) Successful in 9m34s
ci / build-ref (master) (push) Successful in 9m37s
ci / build-ref (refs/tags/v0.5.1) (push) Successful in 9m37s
ci / build-ref (refs/pull/731/head) (push) Successful in 9m39s
ci / k3s (v0.10.5) (push) Canceled after 0s
ci / k3s (v0.11.0) (push) Canceled after 0s
build(deps): bump @docker/actions-toolkit from 0.53.0 to 0.54.0
2025-02-06 14:25:21 +01:00
CrazyMax aa1e2a0b49 chore: update generated content
Signed-off-by: CrazyMax <[email protected]>
2025-02-06 14:17:41 +01:00
dependabot[bot] 673e008776 build(deps): bump @docker/actions-toolkit from 0.53.0 to 0.54.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.53.0 to 0.54.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.53.0...v0.54.0)

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

Signed-off-by: dependabot[bot] <[email protected]>
2025-02-05 04:05:45 +00:00
CrazyMax ba31df4664 Merge pull request #402 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.53.0
build(deps): bump @docker/actions-toolkit from 0.48.0 to 0.53.0
2025-01-24 10:26:10 +01:00
CrazyMax 5475af18ec chore: update generated content
Signed-off-by: CrazyMax <[email protected]>
2025-01-24 10:21:34 +01:00
dependabot[bot] acacad903e build(deps): bump @docker/actions-toolkit from 0.48.0 to 0.53.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.48.0 to 0.53.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.48.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] <[email protected]>
2025-01-24 04:40:58 +00:00
CrazyMax 6a25f988bd Merge pull request #396 from crazy-max/bake-v6
update bake-action to v6
2025-01-08 18:54:07 +01:00
CrazyMax ca1af179f5 update bake-action to v6
Signed-off-by: CrazyMax <[email protected]>
2025-01-08 13:01:31 +01:00
Tõnis Tiigi 6524bf65af Merge pull request #390 from crazy-max/buildx-cloud-latest
ci / error (push) Failing after 4s
ci / debug (push) Failing after 5s
ci / main (lab:latest) (push) Successful in 11s
ci / main () (push) Successful in 13s
ci / main (latest) (push) Successful in 11s
ci / with-qemu (, all) (push) Failing after 4s
ci / main (v0.4.1) (push) Successful in 14s
ci / install (push) Successful in 10s
ci / with-qemu (v0.9.1, all) (push) Failing after 5s
ci / multi (push) Successful in 14s
ci / with-qemu (v0.9.1, arm64,riscv64,arm) (push) Failing after 5s
ci / docker-driver (push) Successful in 9s
ci / use (false) (push) Successful in 11s
ci / with-qemu (, arm64,riscv64,arm) (push) Failing after 7s
ci / driver (image=moby/buildkit:latest) (push) Successful in 10s
ci / platforms (push) Failing after 4s
ci / use (true) (push) Successful in 16s
ci / driver (image=moby/buildkit:master network=host ) (push) Successful in 13s
ci / endpoint (push) Failing after 15s
ci / config-inline (push) Successful in 14s
ci / docker-context (push) Successful in 8s
ci / config (push) Successful in 17s
ci / standalone-install-error (push) Successful in 11s
ci / standalone-cmd (push) Successful in 12s
ci / cleanup (false) (push) Successful in 9s
ci / append (push) Successful in 14s
ci / cache-binary (false) (push) Successful in 10s
ci / cleanup (true) (push) Successful in 14s
ci / standalone-action (push) Successful in 17s
ci / cache-binary (true) (push) Successful in 15s
ci / main (cloud:v0.11.2-desktop.2) (push) Successful in 9m30s
ci / main (cloud:latest) (push) Successful in 9m31s
ci / build-ref (cb185f095fd3d9444e0aa605d3789e9e05f2a1e7) (push) Successful in 9m32s
ci / build-ref (refs/tags/v0.5.1) (push) Successful in 9m40s
ci / build-ref (refs/pull/731/head) (push) Successful in 9m42s
ci / build-ref (master) (push) Successful in 9m48s
ci / k3s (v0.10.5) (push) Canceled after 0s
ci / k3s (v0.11.0) (push) Canceled after 0s
make cloud prefix optional to download buildx if driver is cloud
2024-12-12 10:30:19 -08:00
CrazyMax 8d5e0747fc chore: update generated content
Signed-off-by: CrazyMax <[email protected]>
2024-12-12 15:39:12 +01:00
CrazyMax 7199e57b35 make cloud prefix optional to download buildx if driver is cloud
Signed-off-by: CrazyMax <[email protected]>
2024-12-12 15:39:12 +01:00
CrazyMax db63cee3de Merge pull request #381 from docker/dependabot/github_actions/codecov/codecov-action-5
build(deps): bump codecov/codecov-action from 4 to 5
2024-12-12 15:07:22 +01:00
CrazyMax 043ebe137f Merge pull request #389 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.48.0
build(deps): bump @docker/actions-toolkit from 0.39.0 to 0.48.0
2024-12-12 15:07:04 +01:00
CrazyMax 686da9073d chore: update generated content
Signed-off-by: CrazyMax <[email protected]>
2024-12-12 15:04:35 +01:00
CrazyMax a3d74876b8 Merge pull request #382 from docker/dependabot/npm_and_yarn/cross-spawn-7.0.6
build(deps): bump cross-spawn from 7.0.3 to 7.0.6
2024-12-12 15:03:07 +01:00
dependabot[bot] 4dcdbcec48 build(deps): bump @docker/actions-toolkit from 0.39.0 to 0.48.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.39.0 to 0.48.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.39.0...v0.48.0)

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

Signed-off-by: dependabot[bot] <[email protected]>
2024-12-12 14:03:00 +00:00
CrazyMax 1a8ac74316 ci: fix deprecated input for codecov-action
Signed-off-by: CrazyMax <[email protected]>
2024-12-12 15:02:42 +01:00
dependabot[bot] e827ebe8ba build(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] <[email protected]>
2024-11-18 23:00:07 +00:00
dependabot[bot] adacc1474e build(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] <[email protected]>
2024-11-15 04:48:17 +00:00
CrazyMax 0f069ddc17 Merge pull request #372 from crazy-max/publish-immutable-action
ci: publish as immutable action workflow
2024-10-26 00:40:56 +02:00
CrazyMax d036b3238c ci: publish as immutable action workflow
Signed-off-by: CrazyMax <[email protected]>
2024-10-25 13:22:55 +02:00
CrazyMax 460e45646d Merge pull request #370 from docker/dependabot/npm_and_yarn/actions/core-1.11.1
build(deps): bump @actions/core from 1.10.1 to 1.11.1
2024-10-07 14:19:44 +02:00
CrazyMax 93aa1c807f chore: update generated content
Signed-off-by: CrazyMax <[email protected]>
2024-10-07 14:17:38 +02:00
CrazyMax d391aad55c remove uuid package and switch to crypto
Signed-off-by: CrazyMax <[email protected]>
2024-10-07 14:16:41 +02:00
dependabot[bot] e5b688ea46 build(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] <[email protected]>
2024-10-07 04:49:55 +00:00
CrazyMax c47758b77c Merge pull request #369 from crazy-max/revert-crypto
ci / main () (push) Successful in 11s
ci / main (lab:v0.11.2-desktop.2) (push) Successful in 10s
ci / error (push) Failing after 4s
ci / main (latest) (push) Successful in 10s
ci / debug (push) Failing after 5s
ci / main (v0.4.1) (push) Successful in 11s
ci / main (lab:latest) (push) Successful in 15s
ci / use (true) (push) Successful in 8s
ci / with-qemu (v0.9.1, arm64,riscv64,arm) (push) Failing after 3s
ci / with-qemu (, all) (push) Failing after 5s
ci / install (push) Successful in 11s
ci / docker-driver (push) Successful in 8s
ci / with-qemu (, arm64,riscv64,arm) (push) Failing after 6s
ci / endpoint (push) Failing after 8s
ci / with-qemu (v0.9.1, all) (push) Failing after 6s
ci / driver (image=moby/buildkit:latest) (push) Successful in 11s
ci / use (false) (push) Successful in 11s
ci / multi (push) Successful in 18s
ci / driver (image=moby/buildkit:master network=host ) (push) Successful in 13s
ci / platforms (push) Failing after 3s
ci / config (push) Successful in 14s
ci / config-inline (push) Successful in 14s
ci / standalone-install-error (push) Successful in 10s
ci / cleanup (false) (push) Successful in 10s
ci / cleanup (true) (push) Successful in 10s
ci / docker-context (push) Successful in 12s
ci / standalone-action (push) Successful in 14s
ci / standalone-cmd (push) Successful in 16s
ci / cache-binary (false) (push) Successful in 13s
ci / append (push) Successful in 17s
ci / cache-binary (true) (push) Successful in 14s
ci / build-ref (master) (push) Successful in 9m34s
ci / build-ref (refs/tags/v0.5.1) (push) Successful in 9m35s
ci / build-ref (refs/pull/731/head) (push) Successful in 9m36s
ci / build-ref (cb185f095fd3d9444e0aa605d3789e9e05f2a1e7) (push) Successful in 9m43s
ci / k3s (v0.10.5) (push) Canceled after 0s
ci / k3s (v0.11.0) (push) Canceled after 0s
switch back to uuid package
2024-10-04 09:42:48 +02:00
CrazyMax 8fea382513 chore: update generated content
Signed-off-by: CrazyMax <[email protected]>
2024-10-04 09:35:26 +02:00
CrazyMax 2874e980e8 switch back to uuid package
Signed-off-by: CrazyMax <[email protected]>
2024-10-04 09:34:00 +02:00
CrazyMax 8026d2bc36 Merge pull request #362 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.39.0
ci / main (lab:latest) (push) Successful in 12s
ci / main () (push) Successful in 14s
ci / error (push) Failing after 4s
ci / debug (push) Failing after 5s
ci / main (lab:v0.11.2-desktop.2) (push) Successful in 12s
ci / main (v0.4.1) (push) Successful in 12s
ci / main (latest) (push) Successful in 13s
ci / with-qemu (, all) (push) Failing after 4s
ci / use (false) (push) Successful in 11s
ci / install (push) Successful in 12s
ci / docker-driver (push) Successful in 8s
ci / with-qemu (v0.9.1, all) (push) Failing after 5s
ci / with-qemu (, arm64,riscv64,arm) (push) Failing after 7s
ci / multi (push) Successful in 16s
ci / use (true) (push) Successful in 12s
ci / with-qemu (v0.9.1, arm64,riscv64,arm) (push) Failing after 5s
ci / driver (image=moby/buildkit:latest) (push) Successful in 13s
ci / driver (image=moby/buildkit:master network=host ) (push) Successful in 13s
ci / endpoint (push) Failing after 13s
ci / config-inline (push) Successful in 15s
ci / config (push) Successful in 16s
ci / platforms (push) Failing after 5s
ci / docker-context (push) Successful in 7s
ci / cleanup (false) (push) Successful in 10s
ci / standalone-cmd (push) Successful in 13s
ci / standalone-action (push) Successful in 12s
ci / cleanup (true) (push) Successful in 10s
ci / standalone-install-error (push) Successful in 14s
ci / cache-binary (false) (push) Successful in 14s
ci / append (push) Successful in 17s
ci / build-ref (cb185f095fd3d9444e0aa605d3789e9e05f2a1e7) (push) Successful in 9m35s
ci / cache-binary (true) (push) Successful in 9m33s
ci / build-ref (refs/pull/731/head) (push) Successful in 9m38s
ci / build-ref (master) (push) Successful in 9m39s
ci / build-ref (refs/tags/v0.5.1) (push) Successful in 9m39s
ci / k3s (v0.10.5) (push) Canceled after 0s
ci / k3s (v0.11.0) (push) Canceled after 0s
build(deps): bump @docker/actions-toolkit from 0.35.0 to 0.39.0
2024-10-03 09:29:53 +02:00
CrazyMax e51aab53e9 chore: update generated content
Signed-off-by: CrazyMax <[email protected]>
2024-10-03 09:23:32 +02:00
dependabot[bot] fd7390e14d build(deps): bump @docker/actions-toolkit from 0.35.0 to 0.39.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.35.0 to 0.39.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.35.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] <[email protected]>
2024-10-03 07:19:28 +00:00
CrazyMax 910a304005 Merge pull request #366 from crazy-max/remove-uuid
remove uuid package and switch to crypto
2024-10-03 09:18:07 +02:00
CrazyMax 3623ee443e chore: update generated content
Signed-off-by: CrazyMax <[email protected]>
2024-10-03 09:16:05 +02:00
CrazyMax e0e5ecf670 remove uuid package and switch to crypto
Signed-off-by: CrazyMax <[email protected]>
2024-10-03 09:15:20 +02:00
CrazyMax 5334dd0cdd Merge pull request #363 from crazy-max/set-buildkitd-flags-optin
always set buildkitd-flags if opt-in
2024-10-03 09:14:50 +02:00
CrazyMax 214bb6dac1 chore: update generated content
Signed-off-by: CrazyMax <[email protected]>
2024-10-03 08:54:56 +02:00
CrazyMax 818c69a4ea always set buildkitd-flags if opt-in
Signed-off-by: CrazyMax <[email protected]>
2024-10-03 08:54:55 +02:00
CrazyMax b467d6aa7a Merge pull request #354 from docker/dependabot/npm_and_yarn/path-to-regexp-6.3.0
build(deps): bump path-to-regexp from 6.2.2 to 6.3.0
2024-09-12 22:41:49 +02:00
dependabot[bot] 7594cf3831 build(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] <[email protected]>
2024-09-12 19:22:52 +00:00
CrazyMax 988b5a0280 Merge pull request #347 from crazy-max/skip-malformed-context
ci / main () (push) Successful in 9s
ci / main (lab:latest) (push) Successful in 12s
ci / main (latest) (push) Successful in 10s
ci / main (v0.4.1) (push) Successful in 13s
ci / multi (push) Successful in 13s
ci / debug (push) Failing after 2s
ci / error (push) Failing after 5s
ci / install (push) Successful in 9s
ci / use (false) (push) Successful in 13s
ci / use (true) (push) Successful in 9s
ci / driver (image=moby/buildkit:latest) (push) Successful in 12s
ci / driver (image=moby/buildkit:master network=host ) (push) Successful in 9s
ci / endpoint (push) Failing after 6s
ci / docker-driver (push) Successful in 10s
ci / config (push) Successful in 13s
ci / with-qemu (, all) (push) Failing after 2s
ci / with-qemu (, arm64,riscv64,arm) (push) Failing after 2s
ci / config-inline (push) Successful in 17s
ci / with-qemu (v0.9.1, all) (push) Failing after 2s
ci / with-qemu (v0.9.1, arm64,riscv64,arm) (push) Failing after 5s
ci / standalone-cmd (push) Successful in 13s
ci / standalone-action (push) Successful in 15s
ci / standalone-install-error (push) Successful in 12s
ci / platforms (push) Failing after 4s
ci / append (push) Successful in 12s
ci / docker-context (push) Successful in 9s
ci / cleanup (false) (push) Successful in 10s
ci / cleanup (true) (push) Successful in 13s
ci / cache-binary (false) (push) Successful in 12s
ci / main (lab:v0.11.2-desktop.2) (push) Successful in 9m34s
ci / build-ref (cb185f095fd3d9444e0aa605d3789e9e05f2a1e7) (push) Successful in 9m35s
ci / build-ref (master) (push) Successful in 9m36s
ci / build-ref (refs/tags/v0.5.1) (push) Successful in 9m33s
ci / build-ref (refs/pull/731/head) (push) Successful in 9m38s
ci / cache-binary (true) (push) Successful in 9m29s
ci / k3s (v0.10.5) (push) Canceled after 0s
ci / k3s (v0.11.0) (push) Canceled after 0s
check for malformed docker context
2024-07-29 18:29:31 +02:00
CrazyMax 2c215620b8 chore: update generated content
Signed-off-by: CrazyMax <[email protected]>
2024-07-29 18:25:27 +02:00
CrazyMax 3382292cd5 check for malformed docker context
Signed-off-by: CrazyMax <[email protected]>
2024-07-29 18:24:18 +02:00
CrazyMax 3d68780484 Merge pull request #341 from crazy-max/docker-context-tls
ci / main () (push) Successful in 10s
ci / main (lab:latest) (push) Successful in 10s
ci / error (push) Failing after 5s
ci / debug (push) Failing after 5s
ci / multi (push) Successful in 13s
ci / main (latest) (push) Successful in 17s
ci / main (v0.4.1) (push) Successful in 18s
ci / install (push) Successful in 11s
ci / use (true) (push) Successful in 9s
ci / use (false) (push) Successful in 11s
ci / with-qemu (, all) (push) Failing after 4s
ci / driver (image=moby/buildkit:latest) (push) Successful in 13s
ci / docker-driver (push) Successful in 11s
ci / endpoint (push) Failing after 12s
ci / driver (image=moby/buildkit:master network=host ) (push) Successful in 14s
ci / with-qemu (, arm64,riscv64,arm) (push) Failing after 4s
ci / with-qemu (v0.9.1, all) (push) Failing after 5s
ci / with-qemu (v0.9.1, arm64,riscv64,arm) (push) Failing after 5s
ci / config (push) Successful in 14s
ci / standalone-action (push) Successful in 14s
ci / standalone-cmd (push) Successful in 20s
ci / standalone-install-error (push) Successful in 13s
ci / platforms (push) Failing after 5s
ci / append (push) Successful in 17s
ci / docker-context (push) Successful in 9s
ci / cleanup (false) (push) Successful in 13s
ci / cleanup (true) (push) Successful in 12s
ci / config-inline (push) Successful in 1m17s
ci / cache-binary (true) (push) Successful in 12s
ci / cache-binary (false) (push) Successful in 17s
ci / main (lab:v0.11.2-desktop.2) (push) Successful in 9m34s
ci / build-ref (refs/pull/731/head) (push) Successful in 9m36s
ci / build-ref (cb185f095fd3d9444e0aa605d3789e9e05f2a1e7) (push) Successful in 9m40s
ci / build-ref (refs/tags/v0.5.1) (push) Successful in 9m40s
ci / build-ref (master) (push) Successful in 9m47s
ci / k3s (v0.10.5) (push) Canceled after 0s
ci / k3s (v0.11.0) (push) Canceled after 0s
create docker context if default one has TLS data loaded
2024-07-29 15:34:28 +02:00
CrazyMax d069e98648 chore: update generated content
Signed-off-by: CrazyMax <[email protected]>
2024-07-29 15:16:07 +02:00
CrazyMax 8b850f86dc create docker context if default one has TLS data loaded
Signed-off-by: CrazyMax <[email protected]>
2024-07-29 15:12:05 +02:00
CrazyMax aa33708b10 Merge pull request #345 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.35.0
ci / error (push) Failing after 4s
ci / debug (push) Failing after 4s
ci / main (lab:latest) (push) Successful in 9s
ci / main (lab:v0.11.2-desktop.2) (push) Successful in 12s
ci / main () (push) Successful in 19s
ci / main (latest) (push) Successful in 13s
ci / driver (image=moby/buildkit:latest) (push) Successful in 9s
ci / use (true) (push) Successful in 11s
ci / driver (image=moby/buildkit:master network=host ) (push) Successful in 9s
ci / use (false) (push) Successful in 15s
ci / docker-driver (push) Successful in 8s
ci / install (push) Successful in 18s
ci / multi (push) Successful in 21s
ci / with-qemu (, arm64,riscv64,arm) (push) Failing after 5s
ci / with-qemu (v0.9.1, all) (push) Failing after 4s
ci / with-qemu (, all) (push) Failing after 6s
ci / with-qemu (v0.9.1, arm64,riscv64,arm) (push) Failing after 5s
ci / endpoint (push) Failing after 13s
ci / config-inline (push) Successful in 13s
ci / standalone-cmd (push) Successful in 11s
ci / platforms (push) Failing after 4s
ci / docker-context (push) Successful in 5s
ci / cleanup (false) (push) Successful in 10s
ci / cleanup (true) (push) Successful in 9s
ci / standalone-install-error (push) Successful in 20s
ci / append (push) Successful in 20s
ci / standalone-action (push) Successful in 24s
ci / cache-binary (false) (push) Successful in 10s
ci / config (push) Successful in 52s
ci / main (v0.4.1) (push) Successful in 9m29s
ci / build-ref (refs/tags/v0.5.1) (push) Successful in 9m36s
ci / build-ref (cb185f095fd3d9444e0aa605d3789e9e05f2a1e7) (push) Successful in 9m38s
ci / build-ref (master) (push) Successful in 9m43s
ci / cache-binary (true) (push) Successful in 9m25s
ci / build-ref (refs/pull/731/head) (push) Successful in 9m46s
ci / k3s (v0.11.0) (push) Canceled after 0s
ci / k3s (v0.10.5) (push) Canceled after 0s
build(deps): bump @docker/actions-toolkit from 0.34.0 to 0.35.0
2024-07-22 11:48:29 +02:00
CrazyMax 2d99e3412d chore: update generated content
Signed-off-by: CrazyMax <[email protected]>
2024-07-22 11:45:40 +02:00
dependabot[bot] 4dab43650b build(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] <[email protected]>
2024-07-22 04:47:18 +00:00
CrazyMax 49a04d6890 Merge pull request #344 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.34.0
build(deps): bump @docker/actions-toolkit from 0.32.0 to 0.34.0
2024-07-19 13:09:43 +02:00
CrazyMax a6ade2e34f chore: update generated content
Signed-off-by: CrazyMax <[email protected]>
2024-07-19 13:07:08 +02:00
CrazyMax 2f2694b8d1 switch to Docker exec
Signed-off-by: CrazyMax <[email protected]>
2024-07-19 13:05:34 +02:00
dependabot[bot] 0a4bab6632 build(deps): bump @docker/actions-toolkit from 0.32.0 to 0.34.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.32.0 to 0.34.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.32.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] <[email protected]>
2024-07-18 04:06:15 +00:00
CrazyMax 2ad185228a Merge pull request #340 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.32.0
build(deps): bump @docker/actions-toolkit from 0.31.0 to 0.32.0
2024-07-05 11:38:19 +02:00
CrazyMax 560ac469d6 chore: update generated content
Signed-off-by: CrazyMax <[email protected]>
2024-07-05 11:35:45 +02:00
dependabot[bot] b3a341759e build(deps): bump @docker/actions-toolkit from 0.31.0 to 0.32.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.31.0 to 0.32.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.31.0...v0.32.0)

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

Signed-off-by: dependabot[bot] <[email protected]>
2024-07-05 09:33:37 +00:00
16 changed files with 409 additions and 270 deletions
+2 -1
View File
@@ -25,8 +25,9 @@ jobs:
- ""
- "latest"
- "v0.4.1"
- "cloud:latest"
- "cloud:v0.11.2-desktop.2"
- "lab:latest"
- "lab:v0.11.2-desktop.2"
steps:
-
name: Checkout
+21
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/[email protected]
+3 -3
View File
@@ -23,12 +23,12 @@ jobs:
uses: ./
-
name: Test
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
targets: test
-
name: Upload coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
file: ./coverage/clover.xml
files: ./coverage/clover.xml
token: ${{ secrets.CODECOV_TOKEN }}
+7 -9
View File
@@ -15,16 +15,17 @@ jobs:
prepare:
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.targets.outputs.matrix }}
targets: ${{ steps.generate.outputs.targets }}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Targets matrix
id: targets
run: |
echo "matrix=$(docker buildx bake validate --print | jq -cr '.group.validate.targets')" >> $GITHUB_OUTPUT
name: List targets
id: generate
uses: docker/bake-action/subaction/list-targets@v6
with:
target: validate
validate:
runs-on: ubuntu-latest
@@ -35,11 +36,8 @@ jobs:
matrix:
target: ${{ fromJson(needs.prepare.outputs.targets) }}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Validate
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
targets: ${{ matrix.target }}
+7 -1
View File
@@ -101,7 +101,13 @@ The following inputs can be used as `step.with` keys:
| `cache-binary` | Bool | `true` | Cache buildx binary to GitHub Actions cache backend |
| `cleanup` | Bool | `true` | Cleanup temp files and remove builder at the end of a job |
_\* `buildkitd-config` and `buildkitd-config-inline` are mutually exclusive_
> [!IMPORTANT]
> If you set the `buildkitd-flags` input, the default flags (`--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host`)
> will be reset. If you want to retain the default behavior, make sure to
> include these flags in your custom `buildkitd-flags` value.
> [!NOTE]
> `buildkitd-config` and `buildkitd-config-inline` are mutually exclusive.
### outputs
+158 -3
View File
@@ -1,7 +1,6 @@
import {beforeEach, describe, expect, jest, test} from '@jest/globals';
import * as fs from 'fs';
import * as path from 'path';
import * as uuid from 'uuid';
import {Buildx} from '@docker/actions-toolkit/lib/buildx/buildx';
import {Context} from '@docker/actions-toolkit/lib/context';
import {Docker} from '@docker/actions-toolkit/lib/docker/docker';
@@ -26,8 +25,12 @@ jest.spyOn(Context, 'tmpName').mockImplementation((): string => {
return tmpName;
});
jest.mock('uuid');
jest.spyOn(uuid, 'v4').mockReturnValue('9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d');
jest.mock('crypto', () => {
return {
...(jest.requireActual('crypto') as object),
randomUUID: jest.fn(() => '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d')
};
});
jest.spyOn(Docker, 'context').mockImplementation((): Promise<string> => {
return Promise.resolve('default');
@@ -226,6 +229,24 @@ describe('getCreateArgs', () => {
'--buildkitd-flags', '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host',
'--config', tmpName,
]
],
[
10,
'v0.10.3',
new Map<string, string>([
['install', 'false'],
['use', 'false'],
['driver', 'cloud'],
['buildkitd-flags', '--allow-insecure-entitlement network.host'],
['cache-binary', 'true'],
['cleanup', 'true'],
]),
[
'create',
'--name', 'builder-9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d',
'--driver', 'cloud',
'--buildkitd-flags', '--allow-insecure-entitlement network.host',
]
]
])(
'[%d] given buildx %s and %p as inputs, returns %p',
@@ -302,6 +323,140 @@ describe('getAppendArgs', () => {
);
});
describe('getVersion', () => {
beforeEach(() => {
process.env = Object.keys(process.env).reduce((object, key) => {
if (!key.startsWith('INPUT_')) {
object[key] = process.env[key];
}
return object;
}, {});
});
// prettier-ignore
test.each([
[
0,
new Map<string, string>([
// defaults
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
]),
''
],
[
1,
new Map<string, string>([
['version', 'latest'],
// defaults
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true']
]),
'latest'
],
[
2,
new Map<string, string>([
['version', 'edge'],
// defaults
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true']
]),
'edge'
],
[
3,
new Map<string, string>([
['version', 'v0.19.2'],
// defaults
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true']
]),
'v0.19.2'
],
[
4,
new Map<string, string>([
['version', 'latest'],
['driver', 'cloud'],
// defaults
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true']
]),
'cloud:latest'
],
[
5,
new Map<string, string>([
['version', 'edge'],
['driver', 'cloud'],
// defaults
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true']
]),
'cloud:edge'
],
[
6,
new Map<string, string>([
['driver', 'cloud'],
// defaults
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
]),
'cloud:latest'
],
[
7,
new Map<string, string>([
['version', 'cloud:v0.11.2-desktop.2'],
['driver', 'cloud'],
// defaults
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
]),
'cloud:v0.11.2-desktop.2'
],
[
8,
new Map<string, string>([
['version', 'cloud:v0.11.2-desktop.2'],
// defaults
['install', 'false'],
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
]),
'cloud:v0.11.2-desktop.2'
],
])(
'[%d] given %p as inputs, returns version %p',
async (num: number, inputs: Map<string, string>, expected: string) => {
inputs.forEach((value: string, name: string) => {
setInput(name, value);
});
const inp = await context.getInputs();
expect(context.getVersion(inp)).toEqual(expected);
}
);
});
// See: https://github.com/actions/toolkit/blob/master/packages/core/src/core.ts#L67
function getInputName(name: string): string {
return `INPUT_${name.replace(/ /g, '_').toUpperCase()}`;
+1 -2
View File
@@ -19,7 +19,6 @@ inputs:
required: false
buildkitd-flags:
description: 'BuildKit daemon flags'
default: '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host'
required: false
buildkitd-config:
description: 'BuildKit daemon config file'
@@ -52,7 +51,7 @@ inputs:
description: 'Cleanup temp files and remove builder at the end of a job'
default: 'true'
required: false
# deprecated inputs
# TODO: remove deprecated config and config-inline inputs
config:
description: 'BuildKit daemon config file'
deprecationMessage: 'Use buildkitd-config instead'
Generated Vendored
+14 -14
View File
File diff suppressed because one or more lines are too long
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
Generated Vendored
-6
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.
dot-object
MIT
encoding
MIT
Copyright (c) 2012-2014 Andris Reinman
@@ -3636,9 +3633,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
twirp-ts
MIT
undici
MIT
MIT License
+13
View File
@@ -1,3 +1,9 @@
target "_common" {
args = {
BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1
}
}
group "default" {
targets = ["build"]
}
@@ -11,42 +17,49 @@ group "validate" {
}
target "build" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "build-update"
output = ["."]
}
target "build-validate" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "build-validate"
output = ["type=cacheonly"]
}
target "format" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "format-update"
output = ["."]
}
target "lint" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "lint"
output = ["type=cacheonly"]
}
target "vendor" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "vendor-update"
output = ["."]
}
target "vendor-validate" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "vendor-validate"
output = ["type=cacheonly"]
}
target "test" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "test-coverage"
output = ["./coverage"]
+3 -4
View File
@@ -25,10 +25,9 @@
"license": "Apache-2.0",
"packageManager": "[email protected]",
"dependencies": {
"@actions/core": "^1.10.1",
"@docker/actions-toolkit": "^0.31.0",
"js-yaml": "^4.1.0",
"uuid": "^10.0.0"
"@actions/core": "^1.11.1",
"@docker/actions-toolkit": "^0.56.0",
"js-yaml": "^4.1.0"
},
"devDependencies": {
"@types/js-yaml": "^4.0.9",
+32 -15
View File
@@ -1,4 +1,4 @@
import * as uuid from 'uuid';
import * as crypto from 'crypto';
import * as core from '@actions/core';
import {Docker} from '@docker/actions-toolkit/lib/docker/docker';
@@ -8,6 +8,7 @@ import {Toolkit} from '@docker/actions-toolkit/lib/toolkit';
import {Node} from '@docker/actions-toolkit/lib/types/buildx/builder';
export const builderNodeEnvPrefix = 'BUILDER_NODE';
const defaultBuildkitdFlags = '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host';
export interface Inputs {
version: string;
@@ -32,7 +33,7 @@ export async function getInputs(): Promise<Inputs> {
name: await getBuilderName(core.getInput('driver') || 'docker-container'),
driver: core.getInput('driver') || 'docker-container',
driverOpts: Util.getInputList('driver-opts', {ignoreComma: true, quote: false}),
buildkitdFlags: core.getInput('buildkitd-flags') || '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host',
buildkitdFlags: core.getInput('buildkitd-flags'),
platforms: Util.getInputList('platforms'),
install: core.getBooleanInput('install'),
use: core.getBooleanInput('use'),
@@ -46,17 +47,19 @@ export async function getInputs(): Promise<Inputs> {
}
export async function getBuilderName(driver: string): Promise<string> {
return driver == 'docker' ? await Docker.context() : `builder-${uuid.v4()}`;
return driver == 'docker' ? await Docker.context() : `builder-${crypto.randomUUID()}`;
}
export async function getCreateArgs(inputs: Inputs, toolkit: Toolkit): Promise<Array<string>> {
const args: Array<string> = ['create', '--name', inputs.name, '--driver', inputs.driver];
if (await toolkit.buildx.versionSatisfies('>=0.3.0')) {
await Util.asyncForEach(inputs.driverOpts, async driverOpt => {
await Util.asyncForEach(inputs.driverOpts, async (driverOpt: string) => {
args.push('--driver-opt', driverOpt);
});
if (driverSupportsFlags(inputs.driver) && inputs.buildkitdFlags) {
if (inputs.buildkitdFlags) {
args.push('--buildkitd-flags', inputs.buildkitdFlags);
} else if (driverSupportsBuildkitdFlags(inputs.driver)) {
args.push('--buildkitd-flags', defaultBuildkitdFlags);
}
}
if (inputs.platforms.length > 0) {
@@ -65,12 +68,10 @@ export async function getCreateArgs(inputs: Inputs, toolkit: Toolkit): Promise<A
if (inputs.use) {
args.push('--use');
}
if (driverSupportsFlags(inputs.driver)) {
if (inputs.buildkitdConfig) {
args.push('--config', toolkit.buildkit.config.resolveFromFile(inputs.buildkitdConfig));
} else if (inputs.buildkitdConfigInline) {
args.push('--config', toolkit.buildkit.config.resolveFromString(inputs.buildkitdConfigInline));
}
if (inputs.buildkitdConfig) {
args.push('--config', toolkit.buildkit.config.resolveFromFile(inputs.buildkitdConfig));
} else if (inputs.buildkitdConfigInline) {
args.push('--config', toolkit.buildkit.config.resolveFromString(inputs.buildkitdConfigInline));
}
if (inputs.endpoint) {
args.push(inputs.endpoint);
@@ -83,14 +84,16 @@ export async function getAppendArgs(inputs: Inputs, node: Node, toolkit: Toolkit
if (node.name) {
args.push('--node', node.name);
} else if (inputs.driver == 'kubernetes' && (await toolkit.buildx.versionSatisfies('<0.11.0'))) {
args.push('--node', `node-${uuid.v4()}`);
args.push('--node', `node-${crypto.randomUUID()}`);
}
if (node['driver-opts'] && (await toolkit.buildx.versionSatisfies('>=0.3.0'))) {
await Util.asyncForEach(node['driver-opts'], async driverOpt => {
await Util.asyncForEach(node['driver-opts'], async (driverOpt: string) => {
args.push('--driver-opt', driverOpt);
});
if (driverSupportsFlags(inputs.driver) && node['buildkitd-flags']) {
if (node['buildkitd-flags']) {
args.push('--buildkitd-flags', node['buildkitd-flags']);
} else if (driverSupportsBuildkitdFlags(inputs.driver)) {
args.push('--buildkitd-flags', defaultBuildkitdFlags);
}
}
if (node.platforms) {
@@ -110,6 +113,20 @@ export async function getInspectArgs(inputs: Inputs, toolkit: Toolkit): Promise<
return args;
}
function driverSupportsFlags(driver: string): boolean {
function driverSupportsBuildkitdFlags(driver: string): boolean {
return driver == '' || driver == 'docker-container' || driver == 'docker' || driver == 'kubernetes';
}
export function getVersion(inputs: Inputs): string {
const version = inputs.version;
if (inputs.driver === 'cloud') {
if (!version || version === 'latest') {
return 'cloud:latest';
}
if (version.startsWith('cloud:') || version.startsWith('lab:')) {
return version;
}
return `cloud:${version}`;
}
return version;
}
+65 -5
View File
@@ -1,3 +1,4 @@
import * as crypto from 'crypto';
import * as fs from 'fs';
import * as yaml from 'js-yaml';
import * as core from '@actions/core';
@@ -11,6 +12,7 @@ import {Toolkit} from '@docker/actions-toolkit/lib/toolkit';
import {Util} from '@docker/actions-toolkit/lib/util';
import {Node} from '@docker/actions-toolkit/lib/types/buildx/builder';
import {ContextInfo} from '@docker/actions-toolkit/lib/types/docker/docker';
import * as context from './context';
import * as stateHelper from './state-helper';
@@ -20,6 +22,7 @@ actionsToolkit.run(
async () => {
const inputs: context.Inputs = await context.getInputs();
stateHelper.setCleanup(inputs.cleanup);
const version = context.getVersion(inputs);
const toolkit = new Toolkit();
const standalone = await toolkit.buildx.isStandalone();
@@ -35,16 +38,16 @@ actionsToolkit.run(
});
let toolPath;
if (Util.isValidRef(inputs.version)) {
if (Util.isValidRef(version)) {
if (standalone) {
throw new Error(`Cannot build from source without the Docker CLI`);
}
await core.group(`Build buildx from source`, async () => {
toolPath = await toolkit.buildxInstall.build(inputs.version, !inputs.cacheBinary);
toolPath = await toolkit.buildxInstall.build(version, !inputs.cacheBinary);
});
} else if (!(await toolkit.buildx.isAvailable()) || inputs.version) {
} else if (!(await toolkit.buildx.isAvailable()) || version) {
await core.group(`Download buildx from GitHub Releases`, async () => {
toolPath = await toolkit.buildxInstall.download(inputs.version || 'latest', !inputs.cacheBinary);
toolPath = await toolkit.buildxInstall.download(version || 'latest', !inputs.cacheBinary);
});
}
if (toolPath) {
@@ -68,6 +71,51 @@ actionsToolkit.run(
fs.mkdirSync(Buildx.certsDir, {recursive: true});
stateHelper.setCertsDir(Buildx.certsDir);
// if the default context has TLS data loaded and endpoint is not set, then
// we create a temporary docker context only if driver is docker-container
// https://github.com/docker/buildx/blob/b96ad59f64d40873e4959336d294b648bb3937fe/builder/builder.go#L489
// https://github.com/docker/setup-buildx-action/issues/105
if (!standalone && inputs.driver == 'docker-container' && (await Docker.context()) == 'default' && inputs.endpoint.length == 0) {
let defaultContextWithTLS: boolean = false;
await core.group(`Inspecting default docker context`, async () => {
await Docker.getExecOutput(['context', 'inspect', '--format=json', 'default'], {
ignoreReturnCode: true,
silent: true
}).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) {
core.info(`Cannot inspect default docker context: ${res.stderr.trim()}`);
} else {
try {
const contextInfo = (<Array<ContextInfo>>JSON.parse(res.stdout.trim()))[0];
core.info(JSON.stringify(JSON.parse(res.stdout.trim()), undefined, 2));
const hasTLSData = Object.keys(contextInfo.Endpoints).length > 0 && Object.values(contextInfo.Endpoints)[0].TLSData !== undefined;
const hasTLSMaterial = Object.keys(contextInfo.TLSMaterial).length > 0 && Object.values(contextInfo.TLSMaterial)[0].length > 0;
defaultContextWithTLS = hasTLSData || hasTLSMaterial;
} catch (e) {
core.info(`Unable to parse default docker context info: ${e}`);
core.info(res.stdout.trim());
}
}
});
});
if (defaultContextWithTLS) {
const tmpDockerContext = `buildx-${crypto.randomUUID()}`;
await core.group(`Creating temp docker context (TLS data loaded in default one)`, async () => {
await Docker.getExecOutput(['context', 'create', tmpDockerContext], {
ignoreReturnCode: true
}).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) {
core.warning(`Cannot create docker context ${tmpDockerContext}: ${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`);
} else {
core.info(`Setting builder endpoint to ${tmpDockerContext} context`);
inputs.endpoint = tmpDockerContext;
stateHelper.setTmpDockerContext(tmpDockerContext);
}
});
});
}
}
if (inputs.driver !== 'docker') {
await core.group(`Creating a new builder instance`, async () => {
const certsDriverOpts = Buildx.resolveCertsDriverOpts(inputs.driver, inputs.endpoint, {
@@ -181,7 +229,7 @@ actionsToolkit.run(
async () => {
if (stateHelper.IsDebug && stateHelper.containerName.length > 0) {
await core.group(`BuildKit container logs`, async () => {
await Exec.getExecOutput('docker', ['logs', `${stateHelper.containerName}`], {
await Docker.getExecOutput(['logs', `${stateHelper.containerName}`], {
ignoreReturnCode: true
}).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) {
@@ -214,6 +262,18 @@ actionsToolkit.run(
});
}
if (stateHelper.tmpDockerContext) {
await core.group(`Removing temp docker context`, async () => {
await Exec.getExecOutput('docker', ['context', 'rm', '-f', stateHelper.tmpDockerContext], {
ignoreReturnCode: true
}).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) {
core.warning(`${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`);
}
});
});
}
if (stateHelper.certsDir.length > 0 && fs.existsSync(stateHelper.certsDir)) {
await core.group(`Cleaning up certificates`, async () => {
fs.rmSync(stateHelper.certsDir, {recursive: true});
+5
View File
@@ -6,6 +6,7 @@ export const builderName = process.env['STATE_builderName'] || '';
export const builderDriver = process.env['STATE_builderDriver'] || '';
export const containerName = process.env['STATE_containerName'] || '';
export const certsDir = process.env['STATE_certsDir'] || '';
export const tmpDockerContext = process.env['STATE_tmpDockerContext'] || '';
export const cleanup = /true/i.test(process.env['STATE_cleanup'] || '');
export function setDebug(debug: string) {
@@ -32,6 +33,10 @@ export function setCertsDir(certsDir: string) {
core.saveState('certsDir', certsDir);
}
export function setTmpDockerContext(tmpDockerContext: string) {
core.saveState('tmpDockerContext', tmpDockerContext);
}
export function setCleanup(cleanup: boolean) {
core.saveState('cleanup', cleanup);
}
+77 -206
View File
File diff suppressed because it is too large Load Diff