Compare commits

...
31 Commits
Author SHA1 Message Date
CrazyMaxandGitHub bedaf13569 Merge pull request #620 from crazy-max/shared-error-helpers
use shared error helpers for Buildx and Docker commands
2026-09-14 14:41:58 +02:00
CrazyMax d5079fba84 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-09-14 14:28:43 +02:00
CrazyMax 226a61612a use shared error helpers for Buildx and Docker commands
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-09-14 14:28:42 +02:00
CrazyMaxandGitHub 77ce7f4bab Merge pull request #619 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.100.0
build(deps): bump @docker/actions-toolkit from 0.99.0 to 0.100.0
2026-09-14 14:23:04 +02:00
github-actions[bot] 0dc1dc94f0 [dependabot skip] chore: update generated content 2026-09-14 11:56:45 +00:00
dependabot[bot]andGitHub 9941930bf6 build(deps): bump @docker/actions-toolkit from 0.99.0 to 0.100.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.99.0 to 0.100.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.99.0...v0.100.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-14 11:55:51 +00:00
CrazyMaxandGitHub f840b60a5b Merge pull request #617 from docker/dependabot/npm_and_yarn/js-yaml-5.4.1
build(deps): bump js-yaml from 5.4.1 to 5.4.2
2026-09-14 08:58:49 +02:00
github-actions[bot] d3c78156b5 [dependabot skip] chore: update generated content 2026-09-14 06:55:44 +00:00
dependabot[bot]andGitHub 842fd7aba7 build(deps): bump js-yaml from 5.4.1 to 5.4.2
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 5.4.1 to 5.4.2.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/5.4.1...5.4.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-14 06:54:44 +00:00
CrazyMaxandGitHub 91fda88893 Merge pull request #618 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.99.0
build(deps): bump @docker/actions-toolkit from 0.96.0 to 0.99.0
2026-09-14 08:53:34 +02:00
CrazyMaxandGitHub 0e66b76dff Merge pull request #614 from docker/dependabot/npm_and_yarn/humanfs/node-0.16.8
build(deps): bump @humanfs/node from 0.16.7 to 0.16.8
2026-09-14 08:52:51 +02:00
CrazyMaxandGitHub 9e24513fba Merge pull request #612 from docker/dependabot/github_actions/docker/setup-qemu-action-4.3.0
build(deps): bump docker/setup-qemu-action from 4.2.0 to 4.3.0
2026-09-14 08:52:27 +02:00
CrazyMaxandGitHub 23cd853abe Merge pull request #611 from docker/dependabot/npm_and_yarn/postcss-selector-parser-7.1.5
build(deps): bump postcss-selector-parser from 7.1.1 to 7.1.5
2026-09-14 08:52:16 +02:00
CrazyMaxandGitHub 510b8b46fc Merge pull request #602 from docker/dependabot/github_actions/crazy-max-dot-github-edbced0631
build(deps): bump the crazy-max-dot-github group across 1 directory with 3 updates
2026-09-14 08:52:07 +02:00
CrazyMaxandGitHub df6aa2269a Merge pull request #589 from docker/dependabot/github_actions/codeql-actions-af2beed448
build(deps): bump the codeql-actions group across 1 directory with 2 updates
2026-09-14 08:51:55 +02:00
github-actions[bot] 7f1cb2b5f6 [dependabot skip] chore: update generated content 2026-09-14 04:44:22 +00:00
dependabot[bot]andGitHub b98bdf1163 build(deps): bump @docker/actions-toolkit from 0.96.0 to 0.99.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.96.0 to 0.99.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.96.0...v0.99.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-14 04:43:29 +00:00
dependabot[bot]andGitHub af189076ae build(deps): bump the codeql-actions group across 1 directory with 2 updates
Bumps the codeql-actions group with 2 updates in the / directory: [github/codeql-action/init](https://github.com/github/codeql-action) and [github/codeql-action/analyze](https://github.com/github/codeql-action).


Updates `github/codeql-action/init` from 4.36.2 to 4.37.9
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/8aad20d150bbac5944a9f9d289da16a4b0d87c1e...cdf488f595d80d6e07e03d4674febd5ab45fa938)

Updates `github/codeql-action/analyze` from 4.36.2 to 4.37.9
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/8aad20d150bbac5944a9f9d289da16a4b0d87c1e...cdf488f595d80d6e07e03d4674febd5ab45fa938)

---
updated-dependencies:
- dependency-name: github/codeql-action/analyze
  dependency-version: 4.36.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: codeql-actions
- dependency-name: github/codeql-action/init
  dependency-version: 4.36.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: codeql-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-04 04:44:19 +00:00
dependabot[bot]andGitHub b005abb1e0 build(deps): bump the crazy-max-dot-github group across 1 directory with 3 updates
Bumps the crazy-max-dot-github group with 3 updates in the / directory: [crazy-max/.github/.github/actions/install-k3s](https://github.com/crazy-max/.github), [crazy-max/.github/.github/workflows/pr-assign-author.yml](https://github.com/crazy-max/.github) and [crazy-max/.github/.github/workflows/zizmor.yml](https://github.com/crazy-max/.github).


Updates `crazy-max/.github/.github/actions/install-k3s` from 1.10.1 to 1.11.0
- [Release notes](https://github.com/crazy-max/.github/releases)
- [Commits](https://github.com/crazy-max/.github/compare/46267a6e61cd56aac2fc79943df180152f4c89d6...f91220cba053bd54299ba645a599ee8ed436f222)

Updates `crazy-max/.github/.github/workflows/pr-assign-author.yml` from 1.10.1 to 1.11.0
- [Release notes](https://github.com/crazy-max/.github/releases)
- [Commits](https://github.com/crazy-max/.github/compare/46267a6e61cd56aac2fc79943df180152f4c89d6...f91220cba053bd54299ba645a599ee8ed436f222)

Updates `crazy-max/.github/.github/workflows/zizmor.yml` from 1.10.1 to 1.11.0
- [Release notes](https://github.com/crazy-max/.github/releases)
- [Commits](https://github.com/crazy-max/.github/compare/46267a6e61cd56aac2fc79943df180152f4c89d6...f91220cba053bd54299ba645a599ee8ed436f222)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-04 04:42:21 +00:00
dependabot[bot]andGitHub 78b0615af3 build(deps): bump @humanfs/node from 0.16.7 to 0.16.8
Bumps [@humanfs/node](https://github.com/humanwhocodes/humanfs/tree/HEAD/packages/node) from 0.16.7 to 0.16.8.
- [Release notes](https://github.com/humanwhocodes/humanfs/releases)
- [Changelog](https://github.com/humanwhocodes/humanfs/blob/main/packages/node/CHANGELOG.md)
- [Commits](https://github.com/humanwhocodes/humanfs/commits/node-v0.16.8/packages/node)

---
updated-dependencies:
- dependency-name: "@humanfs/node"
  dependency-version: 0.16.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-03 11:52:32 +00:00
CrazyMaxandGitHub 5ac4a31b15 Merge pull request #606 from crazy-max/cloud-driver-oss
Use official Buildx releases for cloud driver
2026-09-03 13:20:05 +02:00
CrazyMax 7b088f724c chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-09-03 11:04:26 +02:00
CrazyMax e38e8a1e29 Use official Buildx releases for cloud driver
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-09-03 10:35:14 +02:00
dependabot[bot]andGitHub 20e2701a77 build(deps): bump docker/setup-qemu-action from 4.2.0 to 4.3.0
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/96fe6ef7f33517b61c61be40b68a1882f3264fb8...1f40c72289eff860ee54a304f1438e3cff362e0a)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-03 04:42:47 +00:00
dependabot[bot]andGitHub b75cf9098e build(deps): bump postcss-selector-parser from 7.1.1 to 7.1.5
Bumps [postcss-selector-parser](https://github.com/postcss/postcss-selector-parser) from 7.1.1 to 7.1.5.
- [Release notes](https://github.com/postcss/postcss-selector-parser/releases)
- [Changelog](https://github.com/postcss/postcss-selector-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss-selector-parser/compare/v7.1.1...7.1.5)

---
updated-dependencies:
- dependency-name: postcss-selector-parser
  dependency-version: 7.1.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-01 22:07:19 +00:00
CrazyMaxandGitHub 1a2e524850 Merge pull request #610 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.96.0
build(deps): bump @docker/actions-toolkit from 0.95.0 to 0.96.0
2026-09-01 13:33:48 +02:00
github-actions[bot] c41f88734b [dependabot skip] chore: update generated content 2026-09-01 11:31:38 +00:00
dependabot[bot]andGitHub 38f63b05d6 build(deps): bump @docker/actions-toolkit from 0.95.0 to 0.96.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.95.0 to 0.96.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.95.0...v0.96.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-01 11:30:45 +00:00
CrazyMaxandGitHub 120ea02953 Merge pull request #608 from docker/dependabot/npm_and_yarn/js-yaml-5.4.1
build(deps): bump js-yaml from 5.3.0 to 5.4.1
2026-09-01 13:28:57 +02:00
github-actions[bot] d055e6c81b [dependabot skip] chore: update generated content 2026-08-31 04:44:51 +00:00
dependabot[bot]andGitHub 077263eb4f build(deps): bump js-yaml from 5.3.0 to 5.4.1
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 5.3.0 to 5.4.1.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/5.3.0...5.4.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 5.4.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-31 04:43:55 +00:00
12 changed files with 219 additions and 320 deletions
+4 -4
View File
@@ -105,7 +105,7 @@ jobs:
EOL EOL
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0 uses: docker/setup-qemu-action@1f40c72289eff860ee54a304f1438e3cff362e0a # v4.3.0
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: ./ uses: ./
@@ -291,7 +291,7 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0 uses: docker/setup-qemu-action@1f40c72289eff860ee54a304f1438e3cff362e0a # v4.3.0
with: with:
platforms: ${{ matrix.qemu-platforms }} platforms: ${{ matrix.qemu-platforms }}
- -
@@ -431,7 +431,7 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0 uses: docker/setup-qemu-action@1f40c72289eff860ee54a304f1438e3cff362e0a # v4.3.0
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: ./ uses: ./
@@ -488,7 +488,7 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- -
name: Install k3s name: Install k3s
uses: crazy-max/.github/.github/actions/install-k3s@46267a6e61cd56aac2fc79943df180152f4c89d6 # v1.10.1 uses: crazy-max/.github/.github/actions/install-k3s@f91220cba053bd54299ba645a599ee8ed436f222 # v1.11.0
- -
name: Set up Docker Buildx name: Set up Docker Buildx
id: buildx id: buildx
+2 -2
View File
@@ -35,12 +35,12 @@ jobs:
node-version: ${{ env.NODE_VERSION }} node-version: ${{ env.NODE_VERSION }}
- -
name: Initialize CodeQL name: Initialize CodeQL
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2 uses: github/codeql-action/init@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
with: with:
languages: javascript-typescript languages: javascript-typescript
build-mode: none build-mode: none
- -
name: Perform CodeQL Analysis name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2 uses: github/codeql-action/analyze@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
with: with:
category: "/language:javascript-typescript" category: "/language:javascript-typescript"
+1 -1
View File
@@ -11,7 +11,7 @@ on:
jobs: jobs:
run: run:
uses: crazy-max/.github/.github/workflows/pr-assign-author.yml@46267a6e61cd56aac2fc79943df180152f4c89d6 # v1.10.1 uses: crazy-max/.github/.github/workflows/pr-assign-author.yml@f91220cba053bd54299ba645a599ee8ed436f222 # v1.11.0
permissions: permissions:
contents: read contents: read
pull-requests: write pull-requests: write
+1 -1
View File
@@ -19,7 +19,7 @@ on:
jobs: jobs:
zizmor: zizmor:
uses: crazy-max/.github/.github/workflows/zizmor.yml@46267a6e61cd56aac2fc79943df180152f4c89d6 # v1.10.1 uses: crazy-max/.github/.github/workflows/zizmor.yml@f91220cba053bd54299ba645a599ee8ed436f222 # v1.11.0
permissions: permissions:
contents: read contents: read
security-events: write security-events: write
+20 -135
View File
@@ -234,7 +234,7 @@ describe('getCreateArgs', () => {
], ],
[ [
10, 10,
'v0.10.3', 'v0.37.0',
new Map<string, string>([ new Map<string, string>([
['use', 'false'], ['use', 'false'],
['driver', 'cloud'], ['driver', 'cloud'],
@@ -301,6 +301,25 @@ describe('getCreateArgs', () => {
expect(res).toEqual(expected); expect(res).toEqual(expected);
} }
); );
test('rejects cloud driver with unsupported official Buildx', async () => {
setInput('version', 'v0.36.1');
setInput('driver', 'cloud');
setInput('use', 'true');
setInput('cache-binary', 'true');
setInput('cleanup', 'true');
setInput('keep-state', 'false');
const toolkit = new Toolkit();
const versionSpy = vi.spyOn(Buildx.prototype, 'version').mockImplementation(async (): Promise<string> => {
return 'v0.36.1';
});
try {
const inp = await context.getInputs();
await expect(context.getCreateArgs(inp, toolkit)).rejects.toThrow(/requires Buildx v0.37.0 or later/);
} finally {
versionSpy.mockRestore();
}
});
}); });
describe('getAppendArgs', () => { describe('getAppendArgs', () => {
@@ -361,140 +380,6 @@ 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
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
['keep-state', 'false']
]),
''
],
[
1,
new Map<string, string>([
['version', 'latest'],
// defaults
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
['keep-state', 'false']
]),
'latest'
],
[
2,
new Map<string, string>([
['version', 'edge'],
// defaults
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
['keep-state', 'false']
]),
'edge'
],
[
3,
new Map<string, string>([
['version', 'v0.19.2'],
// defaults
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
['keep-state', 'false']
]),
'v0.19.2'
],
[
4,
new Map<string, string>([
['version', 'latest'],
['driver', 'cloud'],
// defaults
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
['keep-state', 'false']
]),
'cloud:latest'
],
[
5,
new Map<string, string>([
['version', 'edge'],
['driver', 'cloud'],
// defaults
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
['keep-state', 'false']
]),
'cloud:edge'
],
[
6,
new Map<string, string>([
['driver', 'cloud'],
// defaults
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
['keep-state', 'false']
]),
'cloud:latest'
],
[
7,
new Map<string, string>([
['version', 'cloud:v0.11.2-desktop.2'],
['driver', 'cloud'],
// defaults
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
['keep-state', 'false']
]),
'cloud:v0.11.2-desktop.2'
],
[
8,
new Map<string, string>([
['version', 'cloud:v0.11.2-desktop.2'],
// defaults
['use', 'true'],
['cache-binary', 'true'],
['cleanup', 'true'],
['keep-state', 'false']
]),
'cloud:v0.11.2-desktop.2'
],
])(
'[%d] given %o as inputs, returns version %o',
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 // See: https://github.com/actions/toolkit/blob/master/packages/core/src/core.ts#L67
function getInputName(name: string): string { function getInputName(name: string): string {
return `INPUT_${name.replace(/ /g, '_').toUpperCase()}`; return `INPUT_${name.replace(/ /g, '_').toUpperCase()}`;
Generated Vendored
+108 -104
View File
File diff suppressed because one or more lines are too long
Generated Vendored
+4 -4
View File
File diff suppressed because one or more lines are too long
Generated Vendored
+6 -5
View File
@@ -216,7 +216,7 @@ Apache License
The following npm package may be included in this product: The following npm package may be included in this product:
- @docker/actions-toolkit@0.95.0 - @docker/actions-toolkit@0.100.0
This package contains the following license: This package contains the following license:
@@ -1790,11 +1790,12 @@ SOFTWARE.
----------- -----------
The following npm package may be included in this product: The following npm packages may be included in this product:
- js-yaml@5.3.0 - js-yaml@5.4.1
- js-yaml@5.4.2
This package contains the following license: These packages each contain the following license:
(The MIT License) (The MIT License)
@@ -4313,7 +4314,7 @@ The following npm packages may be included in this product:
- pump@2.0.1 - pump@2.0.1
- pumpify@1.5.1 - pumpify@1.5.1
- tar-stream@3.1.7 - tar-stream@3.1.7
- tar-stream@3.2.0 - tar-stream@3.2.1
These packages each contain the following license: These packages each contain the following license:
+2 -2
View File
@@ -24,8 +24,8 @@
"packageManager": "yarn@4.15.0", "packageManager": "yarn@4.15.0",
"dependencies": { "dependencies": {
"@actions/core": "^3.0.1", "@actions/core": "^3.0.1",
"@docker/actions-toolkit": "^0.95.0", "@docker/actions-toolkit": "^0.100.0",
"js-yaml": "^5.3.0" "js-yaml": "^5.4.2"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.39.3", "@eslint/js": "^9.39.3",
+3 -14
View File
@@ -52,6 +52,9 @@ export async function getBuilderName(name: string, driver: string): Promise<stri
export async function getCreateArgs(inputs: Inputs, toolkit: Toolkit): Promise<Array<string>> { export async function getCreateArgs(inputs: Inputs, toolkit: Toolkit): Promise<Array<string>> {
const args: Array<string> = ['create', '--name', inputs.name, '--driver', inputs.driver]; const args: Array<string> = ['create', '--name', inputs.name, '--driver', inputs.driver];
if (inputs.driver === 'cloud' && !inputs.version.startsWith('cloud:') && !inputs.version.startsWith('lab:') && !(await toolkit.buildx.versionSatisfies('>=0.37.0-0'))) {
throw new Error(`Docker Build Cloud with official Buildx requires Buildx v0.37.0 or later. Set version to cloud:<version> or lab:<version> to use the legacy Docker Build Cloud release channel.`);
}
if (await toolkit.buildx.versionSatisfies('>=0.3.0')) { if (await toolkit.buildx.versionSatisfies('>=0.3.0')) {
await Util.asyncForEach(inputs.driverOpts, async (driverOpt: string) => { await Util.asyncForEach(inputs.driverOpts, async (driverOpt: string) => {
args.push('--driver-opt', driverOpt); args.push('--driver-opt', driverOpt);
@@ -116,17 +119,3 @@ export async function getInspectArgs(inputs: Inputs, toolkit: Toolkit): Promise<
function driverSupportsBuildkitdFlags(driver: string): boolean { function driverSupportsBuildkitdFlags(driver: string): boolean {
return driver == '' || driver == 'docker-container' || driver == 'docker' || driver == 'kubernetes'; 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;
}
+20 -21
View File
@@ -22,7 +22,6 @@ actionsToolkit.run(
async () => { async () => {
const inputs: context.Inputs = await context.getInputs(); const inputs: context.Inputs = await context.getInputs();
stateHelper.setCleanup(inputs.cleanup); stateHelper.setCleanup(inputs.cleanup);
const version = context.getVersion(inputs);
const toolkit = new Toolkit(); const toolkit = new Toolkit();
const standalone = await toolkit.buildx.isStandalone(); const standalone = await toolkit.buildx.isStandalone();
@@ -44,17 +43,17 @@ actionsToolkit.run(
}); });
let toolPath; let toolPath;
if (Util.isValidRef(version)) { if (Util.isValidRef(inputs.version)) {
if (standalone) { if (standalone) {
throw new Error(`Cannot build from source without the Docker CLI`); throw new Error(`Cannot build from source without the Docker CLI`);
} }
await core.group(`Build buildx from source`, async () => { await core.group(`Build buildx from source`, async () => {
toolPath = await toolkit.buildxInstall.build(version, !inputs.cacheBinary); toolPath = await toolkit.buildxInstall.build(inputs.version, !inputs.cacheBinary);
}); });
} else if (!(await toolkit.buildx.isAvailable()) || version) { } else if (!(await toolkit.buildx.isAvailable()) || inputs.version || (inputs.driver === 'cloud' && !inputs.version && !(await toolkit.buildx.versionSatisfies('>=0.37.0-0')))) {
await core.group(`Download buildx from GitHub Releases`, async () => { await core.group(`Download buildx from GitHub Releases`, async () => {
toolPath = await toolkit.buildxInstall.download({ toolPath = await toolkit.buildxInstall.download({
version: version || 'latest', version: inputs.version || 'latest',
ghaNoCache: !inputs.cacheBinary ghaNoCache: !inputs.cacheBinary
}); });
}); });
@@ -91,8 +90,8 @@ actionsToolkit.run(
ignoreReturnCode: true, ignoreReturnCode: true,
silent: true silent: true
}).then(res => { }).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) { if (res.exitCode != 0) {
core.info(`Cannot inspect default docker context: ${res.stderr.trim()}`); core.info(`Cannot inspect default docker context: ${Docker.getErrorMessage(res.stderr)}`);
} else { } else {
try { try {
const contextInfo = (<Array<ContextInfo>>JSON.parse(res.stdout.trim()))[0]; const contextInfo = (<Array<ContextInfo>>JSON.parse(res.stdout.trim()))[0];
@@ -113,8 +112,8 @@ actionsToolkit.run(
await Docker.getExecOutput(['context', 'create', tmpDockerContext], { await Docker.getExecOutput(['context', 'create', tmpDockerContext], {
ignoreReturnCode: true ignoreReturnCode: true
}).then(res => { }).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) { if (res.exitCode != 0) {
core.warning(`Cannot create docker context ${tmpDockerContext}: ${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`); core.warning(`Cannot create docker context ${tmpDockerContext}: ${Docker.getErrorMessage(res.stderr)}`);
} else { } else {
core.info(`Setting builder endpoint to ${tmpDockerContext} context`); core.info(`Setting builder endpoint to ${tmpDockerContext} context`);
inputs.endpoint = tmpDockerContext; inputs.endpoint = tmpDockerContext;
@@ -142,8 +141,8 @@ actionsToolkit.run(
await Exec.getExecOutput(createCmd.command, createCmd.args, { await Exec.getExecOutput(createCmd.command, createCmd.args, {
ignoreReturnCode: true ignoreReturnCode: true
}).then(res => { }).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) { if (res.exitCode != 0) {
throw new Error(res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'); throw new Error(`Failed to create builder ${inputs.name}: ${Buildx.getErrorMessage(res.stderr)}`);
} }
}); });
} }
@@ -167,8 +166,8 @@ actionsToolkit.run(
await Exec.getExecOutput(appendCmd.command, appendCmd.args, { await Exec.getExecOutput(appendCmd.command, appendCmd.args, {
ignoreReturnCode: true ignoreReturnCode: true
}).then(res => { }).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) { if (res.exitCode != 0) {
throw new Error(`Failed to append node ${node.name}: ${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`); throw new Error(`Failed to append node ${node.name}: ${Buildx.getErrorMessage(res.stderr)}`);
} }
}); });
nodeIndex++; nodeIndex++;
@@ -181,8 +180,8 @@ actionsToolkit.run(
await Exec.getExecOutput(inspectCmd.command, inspectCmd.args, { await Exec.getExecOutput(inspectCmd.command, inspectCmd.args, {
ignoreReturnCode: true ignoreReturnCode: true
}).then(res => { }).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) { if (res.exitCode != 0) {
throw new Error(res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'); throw new Error(`Failed to boot builder: ${Buildx.getErrorMessage(res.stderr)}`);
} }
}); });
}); });
@@ -226,8 +225,8 @@ actionsToolkit.run(
await Docker.getExecOutput(['logs', `${stateHelper.containerName}`], { await Docker.getExecOutput(['logs', `${stateHelper.containerName}`], {
ignoreReturnCode: true ignoreReturnCode: true
}).then(res => { }).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) { if (res.exitCode != 0) {
core.warning(res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'); core.warning(`Failed to display BuildKit logs: ${Docker.getErrorMessage(res.stderr)}`);
} }
}); });
}); });
@@ -246,8 +245,8 @@ actionsToolkit.run(
await Exec.getExecOutput(rmCmd.command, rmCmd.args, { await Exec.getExecOutput(rmCmd.command, rmCmd.args, {
ignoreReturnCode: true ignoreReturnCode: true
}).then(res => { }).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) { if (res.exitCode != 0) {
core.warning(res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'); core.warning(`Failed to remove builder ${stateHelper.builderName}: ${Buildx.getErrorMessage(res.stderr)}`);
} }
}); });
} else { } else {
@@ -261,8 +260,8 @@ actionsToolkit.run(
await Exec.getExecOutput('docker', ['context', 'rm', '-f', stateHelper.tmpDockerContext], { await Exec.getExecOutput('docker', ['context', 'rm', '-f', stateHelper.tmpDockerContext], {
ignoreReturnCode: true ignoreReturnCode: true
}).then(res => { }).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) { if (res.exitCode != 0) {
core.warning(`${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`); core.warning(`Failed to remove temp docker context ${stateHelper.tmpDockerContext}: ${Docker.getErrorMessage(res.stderr)}`);
} }
}); });
}); });
+48 -27
View File
@@ -437,9 +437,9 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@docker/actions-toolkit@npm:^0.95.0": "@docker/actions-toolkit@npm:^0.100.0":
version: 0.95.0 version: 0.100.0
resolution: "@docker/actions-toolkit@npm:0.95.0" resolution: "@docker/actions-toolkit@npm:0.100.0"
dependencies: dependencies:
"@actions/artifact": "npm:^6.2.1" "@actions/artifact": "npm:^6.2.1"
"@actions/cache": "npm:^6.2.0" "@actions/cache": "npm:^6.2.0"
@@ -457,12 +457,12 @@ __metadata:
gunzip-maybe: "npm:^1.4.2" gunzip-maybe: "npm:^1.4.2"
handlebars: "npm:^4.7.9" handlebars: "npm:^4.7.9"
he: "npm:^1.2.0" he: "npm:^1.2.0"
js-yaml: "npm:^5.3.0" js-yaml: "npm:^5.4.1"
jwt-decode: "npm:^4.0.0" jwt-decode: "npm:^4.0.0"
semver: "npm:^7.8.5" semver: "npm:^7.8.5"
tar-stream: "npm:^3.2.0" tar-stream: "npm:^3.2.1"
tmp: "npm:^0.2.7" tmp: "npm:^0.2.7"
checksum: 10/535f9252dbe129566865d03bc4fe57292e04593a4a09c208a94a0e5ecc4c24853fa82513fa152e176e60cef84d54c99ce4b2937ec9de00a5b70b93df374e4df9 checksum: 10/74eaa1afb1887ed2974e403870205889844d42eb527550309819fd24b80484b92ebf95ba4ee01eef607b66acd655a8457fc25a6d27ff2f81e842705ff98b1976
languageName: node languageName: node
linkType: hard linkType: hard
@@ -934,20 +934,30 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@humanfs/core@npm:^0.19.1": "@humanfs/core@npm:^0.19.2":
version: 0.19.1 version: 0.19.2
resolution: "@humanfs/core@npm:0.19.1" resolution: "@humanfs/core@npm:0.19.2"
checksum: 10/270d936be483ab5921702623bc74ce394bf12abbf57d9145a69e8a0d1c87eb1c768bd2d93af16c5705041e257e6d9cc7529311f63a1349f3678abc776fc28523 dependencies:
"@humanfs/types": "npm:^0.15.0"
checksum: 10/c6c0273721ec8df3d36a57c390a11a168d0a2f513d78bceb25165bded4fcb73609b1a317edc6c8f331cefd4b47285dde0b1e6679e08ef7f062232ec14fe05312
languageName: node languageName: node
linkType: hard linkType: hard
"@humanfs/node@npm:^0.16.6": "@humanfs/node@npm:^0.16.6":
version: 0.16.7 version: 0.16.8
resolution: "@humanfs/node@npm:0.16.7" resolution: "@humanfs/node@npm:0.16.8"
dependencies: dependencies:
"@humanfs/core": "npm:^0.19.1" "@humanfs/core": "npm:^0.19.2"
"@humanfs/types": "npm:^0.15.0"
"@humanwhocodes/retry": "npm:^0.4.0" "@humanwhocodes/retry": "npm:^0.4.0"
checksum: 10/b3633d3dce898592cac515ba5e6693c78e6be92863541d3eaf2c009b10f52b2fa62ff6e6e06f240f2447ddbe7b5f1890bc34e9308470675c876eee207553a08d checksum: 10/ed01b3c066d9cec7526d139b9e71ca00ee4a30b3b5f5f5c198eb069c3509a3e167e180ba7e1e5a83b9571e906c4908bd20402b47586887452311af7354995e95
languageName: node
linkType: hard
"@humanfs/types@npm:^0.15.0":
version: 0.15.0
resolution: "@humanfs/types@npm:0.15.0"
checksum: 10/dea3cc7fd8f8d4d088ed8d0a9921cf12bd8e1cdf40a6133106b03a6e2aebcc9a6f1771b3643b7ec71baae90d08245db34069dfcc861da8d678662741e6c3c986
languageName: node languageName: node
linkType: hard linkType: hard
@@ -2826,7 +2836,7 @@ __metadata:
resolution: "docker-setup-buildx@workspace:." resolution: "docker-setup-buildx@workspace:."
dependencies: dependencies:
"@actions/core": "npm:^3.0.1" "@actions/core": "npm:^3.0.1"
"@docker/actions-toolkit": "npm:^0.95.0" "@docker/actions-toolkit": "npm:^0.100.0"
"@eslint/js": "npm:^9.39.3" "@eslint/js": "npm:^9.39.3"
"@types/js-yaml": "npm:^4.0.9" "@types/js-yaml": "npm:^4.0.9"
"@types/node": "npm:^24.11.0" "@types/node": "npm:^24.11.0"
@@ -2840,7 +2850,7 @@ __metadata:
eslint-plugin-prettier: "npm:^5.5.5" eslint-plugin-prettier: "npm:^5.5.5"
generate-license-file: "npm:^4.1.1" generate-license-file: "npm:^4.1.1"
globals: "npm:^17.3.0" globals: "npm:^17.3.0"
js-yaml: "npm:^5.3.0" js-yaml: "npm:^5.4.2"
prettier: "npm:^3.8.1" prettier: "npm:^3.8.1"
typescript: "npm:^5.9.3" typescript: "npm:^5.9.3"
vitest: "npm:^4.0.18" vitest: "npm:^4.0.18"
@@ -3997,14 +4007,25 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"js-yaml@npm:^5.3.0": "js-yaml@npm:^5.4.1":
version: 5.3.0 version: 5.4.1
resolution: "js-yaml@npm:5.3.0" resolution: "js-yaml@npm:5.4.1"
dependencies: dependencies:
argparse: "npm:^2.0.1" argparse: "npm:^2.0.1"
bin: bin:
js-yaml: bin/js-yaml.mjs js-yaml: bin/js-yaml.mjs
checksum: 10/6c7e8ea8dd5643d9df73f4aa796f3572537284e9b819b74ef919467452bfa4624f8f7477cfc775c91db7e2f32387133b1b6c4e95aef9702be6bb042ae554884a checksum: 10/6fff9ee00bd59aeb7e1484b4281f5e927b117cbfbf3ffa6c0fef0c58519317eb61527e93c4aa70f417709229bc1eeed63cba773913577a64405975a72fba7180
languageName: node
linkType: hard
"js-yaml@npm:^5.4.2":
version: 5.4.2
resolution: "js-yaml@npm:5.4.2"
dependencies:
argparse: "npm:^2.0.1"
bin:
js-yaml: bin/js-yaml.mjs
checksum: 10/f2461abd1d6268fb226733f0a0e0aa48004bb824116e3dfa75f1a1279001936343b672066dfecdb852ac3ca883452706c383a760aa90430cb68ba395aa2cbc84
languageName: node languageName: node
linkType: hard linkType: hard
@@ -4924,12 +4945,12 @@ __metadata:
linkType: hard linkType: hard
"postcss-selector-parser@npm:^7.0.0": "postcss-selector-parser@npm:^7.0.0":
version: 7.1.1 version: 7.1.5
resolution: "postcss-selector-parser@npm:7.1.1" resolution: "postcss-selector-parser@npm:7.1.5"
dependencies: dependencies:
cssesc: "npm:^3.0.0" cssesc: "npm:^3.0.0"
util-deprecate: "npm:^1.0.2" util-deprecate: "npm:^1.0.2"
checksum: 10/bb3c6455b20af26a556e3021e21101d8470252644e673c1612f7348ff8dd41b11321329f0694cf299b5b94863f823480b72d3e2f4bd3a89dc43e2d8c0dbad341 checksum: 10/ae66bbcb5d370a3f4b4660e23a208352a885c651f1b420f7b998faaa1034832b870066f49e295f73ee3da6a6c6312c56fea1b2039969f8d803438fa48232b307
languageName: node languageName: node
linkType: hard linkType: hard
@@ -5621,15 +5642,15 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"tar-stream@npm:^3.2.0": "tar-stream@npm:^3.2.1":
version: 3.2.0 version: 3.2.1
resolution: "tar-stream@npm:3.2.0" resolution: "tar-stream@npm:3.2.1"
dependencies: dependencies:
b4a: "npm:^1.6.4" b4a: "npm:^1.6.4"
bare-fs: "npm:^4.5.5" bare-fs: "npm:^4.5.5"
fast-fifo: "npm:^1.2.0" fast-fifo: "npm:^1.2.0"
streamx: "npm:^2.15.0" streamx: "npm:^2.15.0"
checksum: 10/ce57a81521de73ae7a3b7d55a08da50d6771427c249bfa89a208518e48faf5254c8fa7201a8f5419ab8bde9601a74e6dd512b31a13ec89774aec96178f99a8d3 checksum: 10/1a09f857e0789489476d99fb716fa6d209e7d19aa73b7a4b23f40eeba46792d5007ca62fde4fca8f643ed71ace1c526a293c655718a0409275a45a8aa86b562a
languageName: node languageName: node
linkType: hard linkType: hard