mirror of
https://github.com/docker/setup-buildx-action
synced 2024-11-22 19:11:40 +00:00
Merge pull request #27 from crazy-max/hotfix
Temporarly set buildkit container image to moby/buildkit:v0.8-beta
This commit is contained in:
commit
044aaa9258
2 changed files with 30 additions and 10 deletions
12
dist/index.js
generated
vendored
12
dist/index.js
generated
vendored
|
@ -525,12 +525,22 @@ function run() {
|
||||||
if (inputs.driver !== 'docker') {
|
if (inputs.driver !== 'docker') {
|
||||||
core.info('🔨 Creating a new builder instance...');
|
core.info('🔨 Creating a new builder instance...');
|
||||||
let createArgs = ['buildx', 'create', '--name', builderName, '--driver', inputs.driver];
|
let createArgs = ['buildx', 'create', '--name', builderName, '--driver', inputs.driver];
|
||||||
|
if (semver.satisfies(buildxVersion, '>=0.3.0')) {
|
||||||
|
let hasImageDriverOpt = false;
|
||||||
yield context.asyncForEach(inputs.driverOpts, (driverOpt) => __awaiter(this, void 0, void 0, function* () {
|
yield context.asyncForEach(inputs.driverOpts, (driverOpt) => __awaiter(this, void 0, void 0, function* () {
|
||||||
|
if (driverOpt.startsWith('image=')) {
|
||||||
|
hasImageDriverOpt = true;
|
||||||
|
}
|
||||||
createArgs.push('--driver-opt', driverOpt);
|
createArgs.push('--driver-opt', driverOpt);
|
||||||
}));
|
}));
|
||||||
if (inputs.buildkitdFlags && semver.satisfies(buildxVersion, '>=0.3.0')) {
|
if (!hasImageDriverOpt) {
|
||||||
|
//FIXME: Temporary fix (docker/build-push-action#154, docker/build-push-action#162)
|
||||||
|
createArgs.push('--driver-opt', 'image=moby/buildkit:v0.8-beta');
|
||||||
|
}
|
||||||
|
if (inputs.buildkitdFlags) {
|
||||||
createArgs.push('--buildkitd-flags', inputs.buildkitdFlags);
|
createArgs.push('--buildkitd-flags', inputs.buildkitdFlags);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (inputs.use) {
|
if (inputs.use) {
|
||||||
createArgs.push('--use');
|
createArgs.push('--use');
|
||||||
}
|
}
|
||||||
|
|
12
src/main.ts
12
src/main.ts
|
@ -33,12 +33,22 @@ async function run(): Promise<void> {
|
||||||
if (inputs.driver !== 'docker') {
|
if (inputs.driver !== 'docker') {
|
||||||
core.info('🔨 Creating a new builder instance...');
|
core.info('🔨 Creating a new builder instance...');
|
||||||
let createArgs: Array<string> = ['buildx', 'create', '--name', builderName, '--driver', inputs.driver];
|
let createArgs: Array<string> = ['buildx', 'create', '--name', builderName, '--driver', inputs.driver];
|
||||||
|
if (semver.satisfies(buildxVersion, '>=0.3.0')) {
|
||||||
|
let hasImageDriverOpt: boolean = false;
|
||||||
await context.asyncForEach(inputs.driverOpts, async driverOpt => {
|
await context.asyncForEach(inputs.driverOpts, async driverOpt => {
|
||||||
|
if (driverOpt.startsWith('image=')) {
|
||||||
|
hasImageDriverOpt = true;
|
||||||
|
}
|
||||||
createArgs.push('--driver-opt', driverOpt);
|
createArgs.push('--driver-opt', driverOpt);
|
||||||
});
|
});
|
||||||
if (inputs.buildkitdFlags && semver.satisfies(buildxVersion, '>=0.3.0')) {
|
if (!hasImageDriverOpt) {
|
||||||
|
//FIXME: Temporary fix (docker/build-push-action#154, docker/build-push-action#162)
|
||||||
|
createArgs.push('--driver-opt', 'image=moby/buildkit:v0.8-beta');
|
||||||
|
}
|
||||||
|
if (inputs.buildkitdFlags) {
|
||||||
createArgs.push('--buildkitd-flags', inputs.buildkitdFlags);
|
createArgs.push('--buildkitd-flags', inputs.buildkitdFlags);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (inputs.use) {
|
if (inputs.use) {
|
||||||
createArgs.push('--use');
|
createArgs.push('--use');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue