mirror of
https://github.com/docker/setup-buildx-action.git
synced 2024-11-15 17:43:51 +08:00
Temporarly set buildkit container image to moby/buildkit:v0.8-beta
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
c631d8cb6c
commit
d4577a64b2
20
dist/index.js
generated
vendored
20
dist/index.js
generated
vendored
@ -525,11 +525,21 @@ 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];
|
||||||
yield context.asyncForEach(inputs.driverOpts, (driverOpt) => __awaiter(this, void 0, void 0, function* () {
|
if (semver.satisfies(buildxVersion, '>=0.3.0')) {
|
||||||
createArgs.push('--driver-opt', driverOpt);
|
let hasImageDriverOpt = false;
|
||||||
}));
|
yield context.asyncForEach(inputs.driverOpts, (driverOpt) => __awaiter(this, void 0, void 0, function* () {
|
||||||
if (inputs.buildkitdFlags && semver.satisfies(buildxVersion, '>=0.3.0')) {
|
if (driverOpt.startsWith('image=')) {
|
||||||
createArgs.push('--buildkitd-flags', inputs.buildkitdFlags);
|
hasImageDriverOpt = true;
|
||||||
|
}
|
||||||
|
createArgs.push('--driver-opt', driverOpt);
|
||||||
|
}));
|
||||||
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (inputs.use) {
|
if (inputs.use) {
|
||||||
createArgs.push('--use');
|
createArgs.push('--use');
|
||||||
|
20
src/main.ts
20
src/main.ts
@ -33,11 +33,21 @@ 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];
|
||||||
await context.asyncForEach(inputs.driverOpts, async driverOpt => {
|
if (semver.satisfies(buildxVersion, '>=0.3.0')) {
|
||||||
createArgs.push('--driver-opt', driverOpt);
|
let hasImageDriverOpt: boolean = false;
|
||||||
});
|
await context.asyncForEach(inputs.driverOpts, async driverOpt => {
|
||||||
if (inputs.buildkitdFlags && semver.satisfies(buildxVersion, '>=0.3.0')) {
|
if (driverOpt.startsWith('image=')) {
|
||||||
createArgs.push('--buildkitd-flags', inputs.buildkitdFlags);
|
hasImageDriverOpt = true;
|
||||||
|
}
|
||||||
|
createArgs.push('--driver-opt', driverOpt);
|
||||||
|
});
|
||||||
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (inputs.use) {
|
if (inputs.use) {
|
||||||
createArgs.push('--use');
|
createArgs.push('--use');
|
||||||
|
Loading…
Reference in New Issue
Block a user