Compare commits

..

4 Commits

Author SHA1 Message Date
dependabot[bot] 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
CrazyMax 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
11 changed files with 117 additions and 244 deletions
+1 -1
View File
@@ -488,7 +488,7 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
-
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
id: buildx
+1 -1
View File
@@ -11,7 +11,7 @@ on:
jobs:
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:
contents: read
pull-requests: write
+1 -1
View File
@@ -19,7 +19,7 @@ on:
jobs:
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:
contents: read
security-events: write
+20 -135
View File
@@ -234,7 +234,7 @@ describe('getCreateArgs', () => {
],
[
10,
'v0.10.3',
'v0.37.0',
new Map<string, string>([
['use', 'false'],
['driver', 'cloud'],
@@ -301,6 +301,25 @@ describe('getCreateArgs', () => {
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', () => {
@@ -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
function getInputName(name: string): string {
return `INPUT_${name.replace(/ /g, '_').toUpperCase()}`;
Generated Vendored
+77 -77
View File
File diff suppressed because one or more lines are too long
Generated Vendored
+3 -3
View File
File diff suppressed because one or more lines are too long
Generated Vendored
+1 -1
View File
@@ -216,7 +216,7 @@ Apache License
The following npm package may be included in this product:
- @docker/actions-toolkit@0.97.0
- @docker/actions-toolkit@0.96.0
This package contains the following license:
+1 -1
View File
@@ -24,7 +24,7 @@
"packageManager": "yarn@4.15.0",
"dependencies": {
"@actions/core": "^3.0.1",
"@docker/actions-toolkit": "^0.97.0",
"@docker/actions-toolkit": "^0.96.0",
"js-yaml": "^5.4.1"
},
"devDependencies": {
+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>> {
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')) {
await Util.asyncForEach(inputs.driverOpts, async (driverOpt: string) => {
args.push('--driver-opt', driverOpt);
@@ -116,17 +119,3 @@ export async function getInspectArgs(inputs: Inputs, toolkit: Toolkit): Promise<
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;
}
+4 -5
View File
@@ -22,7 +22,6 @@ 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();
@@ -44,17 +43,17 @@ actionsToolkit.run(
});
let toolPath;
if (Util.isValidRef(version)) {
if (Util.isValidRef(inputs.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(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 () => {
toolPath = await toolkit.buildxInstall.download({
version: version || 'latest',
version: inputs.version || 'latest',
ghaNoCache: !inputs.cacheBinary
});
});
+5 -5
View File
@@ -437,9 +437,9 @@ __metadata:
languageName: node
linkType: hard
"@docker/actions-toolkit@npm:^0.97.0":
version: 0.97.0
resolution: "@docker/actions-toolkit@npm:0.97.0"
"@docker/actions-toolkit@npm:^0.96.0":
version: 0.96.0
resolution: "@docker/actions-toolkit@npm:0.96.0"
dependencies:
"@actions/artifact": "npm:^6.2.1"
"@actions/cache": "npm:^6.2.0"
@@ -462,7 +462,7 @@ __metadata:
semver: "npm:^7.8.5"
tar-stream: "npm:^3.2.1"
tmp: "npm:^0.2.7"
checksum: 10/f892c1c40bdb06b4a57b128d92618f2b1e22b6e50cb5b78d659b2c0705dbb12ad51e706cd5d699d51be02734c261f1670ad4e730a7c29a00dc9f0498616f9568
checksum: 10/7116f99ccf54bc47864113ff8911e857a0832e7603e3c2cf62e3ed067b4ce0c8b1987acd05766f57b15b182455987a3f49862b97fe5e413f35a8bc4d71500ae3
languageName: node
linkType: hard
@@ -2826,7 +2826,7 @@ __metadata:
resolution: "docker-setup-buildx@workspace:."
dependencies:
"@actions/core": "npm:^3.0.1"
"@docker/actions-toolkit": "npm:^0.97.0"
"@docker/actions-toolkit": "npm:^0.96.0"
"@eslint/js": "npm:^9.39.3"
"@types/js-yaml": "npm:^4.0.9"
"@types/node": "npm:^24.11.0"