Compare commits
	
		
			20 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					c47758b77c | ||
| 
						 | 
					8fea382513 | ||
| 
						 | 
					2874e980e8 | ||
| 
						 | 
					8026d2bc36 | ||
| 
						 | 
					e51aab53e9 | ||
| 
						 | 
					fd7390e14d | ||
| 
						 | 
					910a304005 | ||
| 
						 | 
					3623ee443e | ||
| 
						 | 
					e0e5ecf670 | ||
| 
						 | 
					5334dd0cdd | ||
| 
						 | 
					214bb6dac1 | ||
| 
						 | 
					818c69a4ea | ||
| 
						 | 
					b467d6aa7a | ||
| 
						 | 
					7594cf3831 | ||
| 
						 | 
					988b5a0280 | ||
| 
						 | 
					2c215620b8 | ||
| 
						 | 
					3382292cd5 | ||
| 
						 | 
					3d68780484 | ||
| 
						 | 
					d069e98648 | ||
| 
						 | 
					8b850f86dc | 
@@ -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                                                                                                                          |
 | 
					| `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                                                                                                                    |
 | 
					| `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
 | 
					### outputs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -226,6 +226,24 @@ describe('getCreateArgs', () => {
 | 
				
			|||||||
        '--buildkitd-flags', '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host',
 | 
					        '--buildkitd-flags', '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host',
 | 
				
			||||||
        '--config', tmpName,
 | 
					        '--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',
 | 
					    '[%d] given buildx %s and %p as inputs, returns %p',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -19,7 +19,6 @@ inputs:
 | 
				
			|||||||
    required: false
 | 
					    required: false
 | 
				
			||||||
  buildkitd-flags:
 | 
					  buildkitd-flags:
 | 
				
			||||||
    description: 'BuildKit daemon flags'
 | 
					    description: 'BuildKit daemon flags'
 | 
				
			||||||
    default: '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host'
 | 
					 | 
				
			||||||
    required: false
 | 
					    required: false
 | 
				
			||||||
  buildkitd-config:
 | 
					  buildkitd-config:
 | 
				
			||||||
    description: 'BuildKit daemon config file'
 | 
					    description: 'BuildKit daemon config file'
 | 
				
			||||||
@@ -52,7 +51,7 @@ inputs:
 | 
				
			|||||||
    description: 'Cleanup temp files and remove builder at the end of a job'
 | 
					    description: 'Cleanup temp files and remove builder at the end of a job'
 | 
				
			||||||
    default: 'true'
 | 
					    default: 'true'
 | 
				
			||||||
    required: false
 | 
					    required: false
 | 
				
			||||||
  # deprecated inputs
 | 
					  # TODO: remove deprecated config and config-inline inputs
 | 
				
			||||||
  config:
 | 
					  config:
 | 
				
			||||||
    description: 'BuildKit daemon config file'
 | 
					    description: 'BuildKit daemon config file'
 | 
				
			||||||
    deprecationMessage: 'Use buildkitd-config instead'
 | 
					    deprecationMessage: 'Use buildkitd-config instead'
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										20
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										2
									
								
								dist/index.js.map
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js.map
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@@ -26,7 +26,7 @@
 | 
				
			|||||||
  "packageManager": "yarn@3.6.3",
 | 
					  "packageManager": "yarn@3.6.3",
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
    "@actions/core": "^1.10.1",
 | 
					    "@actions/core": "^1.10.1",
 | 
				
			||||||
    "@docker/actions-toolkit": "^0.35.0",
 | 
					    "@docker/actions-toolkit": "^0.39.0",
 | 
				
			||||||
    "js-yaml": "^4.1.0",
 | 
					    "js-yaml": "^4.1.0",
 | 
				
			||||||
    "uuid": "^10.0.0"
 | 
					    "uuid": "^10.0.0"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,6 +8,7 @@ import {Toolkit} from '@docker/actions-toolkit/lib/toolkit';
 | 
				
			|||||||
import {Node} from '@docker/actions-toolkit/lib/types/buildx/builder';
 | 
					import {Node} from '@docker/actions-toolkit/lib/types/buildx/builder';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const builderNodeEnvPrefix = 'BUILDER_NODE';
 | 
					export const builderNodeEnvPrefix = 'BUILDER_NODE';
 | 
				
			||||||
 | 
					const defaultBuildkitdFlags = '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface Inputs {
 | 
					export interface Inputs {
 | 
				
			||||||
  version: string;
 | 
					  version: string;
 | 
				
			||||||
@@ -32,7 +33,7 @@ export async function getInputs(): Promise<Inputs> {
 | 
				
			|||||||
    name: await getBuilderName(core.getInput('driver') || 'docker-container'),
 | 
					    name: await getBuilderName(core.getInput('driver') || 'docker-container'),
 | 
				
			||||||
    driver: core.getInput('driver') || 'docker-container',
 | 
					    driver: core.getInput('driver') || 'docker-container',
 | 
				
			||||||
    driverOpts: Util.getInputList('driver-opts', {ignoreComma: true, quote: false}),
 | 
					    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'),
 | 
					    platforms: Util.getInputList('platforms'),
 | 
				
			||||||
    install: core.getBooleanInput('install'),
 | 
					    install: core.getBooleanInput('install'),
 | 
				
			||||||
    use: core.getBooleanInput('use'),
 | 
					    use: core.getBooleanInput('use'),
 | 
				
			||||||
@@ -52,11 +53,13 @@ export async function getBuilderName(driver: string): Promise<string> {
 | 
				
			|||||||
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 (await toolkit.buildx.versionSatisfies('>=0.3.0')) {
 | 
					  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);
 | 
					      args.push('--driver-opt', driverOpt);
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
    if (driverSupportsFlags(inputs.driver) && inputs.buildkitdFlags) {
 | 
					    if (inputs.buildkitdFlags) {
 | 
				
			||||||
      args.push('--buildkitd-flags', inputs.buildkitdFlags);
 | 
					      args.push('--buildkitd-flags', inputs.buildkitdFlags);
 | 
				
			||||||
 | 
					    } else if (driverSupportsBuildkitdFlags(inputs.driver)) {
 | 
				
			||||||
 | 
					      args.push('--buildkitd-flags', defaultBuildkitdFlags);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  if (inputs.platforms.length > 0) {
 | 
					  if (inputs.platforms.length > 0) {
 | 
				
			||||||
@@ -65,13 +68,11 @@ export async function getCreateArgs(inputs: Inputs, toolkit: Toolkit): Promise<A
 | 
				
			|||||||
  if (inputs.use) {
 | 
					  if (inputs.use) {
 | 
				
			||||||
    args.push('--use');
 | 
					    args.push('--use');
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  if (driverSupportsFlags(inputs.driver)) {
 | 
					 | 
				
			||||||
  if (inputs.buildkitdConfig) {
 | 
					  if (inputs.buildkitdConfig) {
 | 
				
			||||||
    args.push('--config', toolkit.buildkit.config.resolveFromFile(inputs.buildkitdConfig));
 | 
					    args.push('--config', toolkit.buildkit.config.resolveFromFile(inputs.buildkitdConfig));
 | 
				
			||||||
  } else if (inputs.buildkitdConfigInline) {
 | 
					  } else if (inputs.buildkitdConfigInline) {
 | 
				
			||||||
    args.push('--config', toolkit.buildkit.config.resolveFromString(inputs.buildkitdConfigInline));
 | 
					    args.push('--config', toolkit.buildkit.config.resolveFromString(inputs.buildkitdConfigInline));
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  if (inputs.endpoint) {
 | 
					  if (inputs.endpoint) {
 | 
				
			||||||
    args.push(inputs.endpoint);
 | 
					    args.push(inputs.endpoint);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
@@ -86,11 +87,13 @@ export async function getAppendArgs(inputs: Inputs, node: Node, toolkit: Toolkit
 | 
				
			|||||||
    args.push('--node', `node-${uuid.v4()}`);
 | 
					    args.push('--node', `node-${uuid.v4()}`);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  if (node['driver-opts'] && (await toolkit.buildx.versionSatisfies('>=0.3.0'))) {
 | 
					  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);
 | 
					      args.push('--driver-opt', driverOpt);
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
    if (driverSupportsFlags(inputs.driver) && node['buildkitd-flags']) {
 | 
					    if (node['buildkitd-flags']) {
 | 
				
			||||||
      args.push('--buildkitd-flags', node['buildkitd-flags']);
 | 
					      args.push('--buildkitd-flags', node['buildkitd-flags']);
 | 
				
			||||||
 | 
					    } else if (driverSupportsBuildkitdFlags(inputs.driver)) {
 | 
				
			||||||
 | 
					      args.push('--buildkitd-flags', defaultBuildkitdFlags);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  if (node.platforms) {
 | 
					  if (node.platforms) {
 | 
				
			||||||
@@ -110,6 +113,6 @@ export async function getInspectArgs(inputs: Inputs, toolkit: Toolkit): Promise<
 | 
				
			|||||||
  return args;
 | 
					  return args;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function driverSupportsFlags(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';
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										59
									
								
								src/main.ts
									
									
									
									
									
								
							
							
						
						
									
										59
									
								
								src/main.ts
									
									
									
									
									
								
							@@ -1,5 +1,6 @@
 | 
				
			|||||||
import * as fs from 'fs';
 | 
					import * as fs from 'fs';
 | 
				
			||||||
import * as yaml from 'js-yaml';
 | 
					import * as yaml from 'js-yaml';
 | 
				
			||||||
 | 
					import * as uuid from 'uuid';
 | 
				
			||||||
import * as core from '@actions/core';
 | 
					import * as core from '@actions/core';
 | 
				
			||||||
import * as actionsToolkit from '@docker/actions-toolkit';
 | 
					import * as actionsToolkit from '@docker/actions-toolkit';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -11,6 +12,7 @@ import {Toolkit} from '@docker/actions-toolkit/lib/toolkit';
 | 
				
			|||||||
import {Util} from '@docker/actions-toolkit/lib/util';
 | 
					import {Util} from '@docker/actions-toolkit/lib/util';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import {Node} from '@docker/actions-toolkit/lib/types/buildx/builder';
 | 
					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 context from './context';
 | 
				
			||||||
import * as stateHelper from './state-helper';
 | 
					import * as stateHelper from './state-helper';
 | 
				
			||||||
@@ -68,6 +70,51 @@ actionsToolkit.run(
 | 
				
			|||||||
    fs.mkdirSync(Buildx.certsDir, {recursive: true});
 | 
					    fs.mkdirSync(Buildx.certsDir, {recursive: true});
 | 
				
			||||||
    stateHelper.setCertsDir(Buildx.certsDir);
 | 
					    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-${uuid.v4()}`;
 | 
				
			||||||
 | 
					        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') {
 | 
					    if (inputs.driver !== 'docker') {
 | 
				
			||||||
      await core.group(`Creating a new builder instance`, async () => {
 | 
					      await core.group(`Creating a new builder instance`, async () => {
 | 
				
			||||||
        const certsDriverOpts = Buildx.resolveCertsDriverOpts(inputs.driver, inputs.endpoint, {
 | 
					        const certsDriverOpts = Buildx.resolveCertsDriverOpts(inputs.driver, inputs.endpoint, {
 | 
				
			||||||
@@ -214,6 +261,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)) {
 | 
					    if (stateHelper.certsDir.length > 0 && fs.existsSync(stateHelper.certsDir)) {
 | 
				
			||||||
      await core.group(`Cleaning up certificates`, async () => {
 | 
					      await core.group(`Cleaning up certificates`, async () => {
 | 
				
			||||||
        fs.rmSync(stateHelper.certsDir, {recursive: true});
 | 
					        fs.rmSync(stateHelper.certsDir, {recursive: true});
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,6 +6,7 @@ export const builderName = process.env['STATE_builderName'] || '';
 | 
				
			|||||||
export const builderDriver = process.env['STATE_builderDriver'] || '';
 | 
					export const builderDriver = process.env['STATE_builderDriver'] || '';
 | 
				
			||||||
export const containerName = process.env['STATE_containerName'] || '';
 | 
					export const containerName = process.env['STATE_containerName'] || '';
 | 
				
			||||||
export const certsDir = process.env['STATE_certsDir'] || '';
 | 
					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 const cleanup = /true/i.test(process.env['STATE_cleanup'] || '');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export function setDebug(debug: string) {
 | 
					export function setDebug(debug: string) {
 | 
				
			||||||
@@ -32,6 +33,10 @@ export function setCertsDir(certsDir: string) {
 | 
				
			|||||||
  core.saveState('certsDir', certsDir);
 | 
					  core.saveState('certsDir', certsDir);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function setTmpDockerContext(tmpDockerContext: string) {
 | 
				
			||||||
 | 
					  core.saveState('tmpDockerContext', tmpDockerContext);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export function setCleanup(cleanup: boolean) {
 | 
					export function setCleanup(cleanup: boolean) {
 | 
				
			||||||
  core.saveState('cleanup', cleanup);
 | 
					  core.saveState('cleanup', cleanup);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										40
									
								
								yarn.lock
									
									
									
									
									
								
							
							
						
						
									
										40
									
								
								yarn.lock
									
									
									
									
									
								
							@@ -12,9 +12,9 @@ __metadata:
 | 
				
			|||||||
  languageName: node
 | 
					  languageName: node
 | 
				
			||||||
  linkType: hard
 | 
					  linkType: hard
 | 
				
			||||||
 | 
					
 | 
				
			||||||
"@actions/artifact@npm:^2.1.8":
 | 
					"@actions/artifact@npm:^2.1.9":
 | 
				
			||||||
  version: 2.1.8
 | 
					  version: 2.1.10
 | 
				
			||||||
  resolution: "@actions/artifact@npm:2.1.8"
 | 
					  resolution: "@actions/artifact@npm:2.1.10"
 | 
				
			||||||
  dependencies:
 | 
					  dependencies:
 | 
				
			||||||
    "@actions/core": ^1.10.0
 | 
					    "@actions/core": ^1.10.0
 | 
				
			||||||
    "@actions/github": ^5.1.1
 | 
					    "@actions/github": ^5.1.1
 | 
				
			||||||
@@ -30,7 +30,7 @@ __metadata:
 | 
				
			|||||||
    jwt-decode: ^3.1.2
 | 
					    jwt-decode: ^3.1.2
 | 
				
			||||||
    twirp-ts: ^2.5.0
 | 
					    twirp-ts: ^2.5.0
 | 
				
			||||||
    unzip-stream: ^0.3.1
 | 
					    unzip-stream: ^0.3.1
 | 
				
			||||||
  checksum: 51a47c21bcdac705abb61dbaef923f2760354c39bcad44a31b129e18bf31f646e5148f92ee7e1198275d1dba7bebfd1d1500ad7f62f6de1e65b57b2d092d5341
 | 
					  checksum: dfe4cb49da913e7706b884ff2dac629671f298febb1e54b2800659e4e78651c47032548ee5e18f164e31894b4aca4320201a97a7cd4240d0fbf7d203a6955b29
 | 
				
			||||||
  languageName: node
 | 
					  languageName: node
 | 
				
			||||||
  linkType: hard
 | 
					  linkType: hard
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -105,7 +105,7 @@ __metadata:
 | 
				
			|||||||
  languageName: node
 | 
					  languageName: node
 | 
				
			||||||
  linkType: hard
 | 
					  linkType: hard
 | 
				
			||||||
 | 
					
 | 
				
			||||||
"@actions/http-client@npm:^2.0.1, @actions/http-client@npm:^2.1.0, @actions/http-client@npm:^2.1.1, @actions/http-client@npm:^2.2.0, @actions/http-client@npm:^2.2.1":
 | 
					"@actions/http-client@npm:^2.0.1, @actions/http-client@npm:^2.1.0, @actions/http-client@npm:^2.1.1, @actions/http-client@npm:^2.2.0":
 | 
				
			||||||
  version: 2.2.1
 | 
					  version: 2.2.1
 | 
				
			||||||
  resolution: "@actions/http-client@npm:2.2.1"
 | 
					  resolution: "@actions/http-client@npm:2.2.1"
 | 
				
			||||||
  dependencies:
 | 
					  dependencies:
 | 
				
			||||||
@@ -115,6 +115,16 @@ __metadata:
 | 
				
			|||||||
  languageName: node
 | 
					  languageName: node
 | 
				
			||||||
  linkType: hard
 | 
					  linkType: hard
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					"@actions/http-client@npm:^2.2.3":
 | 
				
			||||||
 | 
					  version: 2.2.3
 | 
				
			||||||
 | 
					  resolution: "@actions/http-client@npm:2.2.3"
 | 
				
			||||||
 | 
					  dependencies:
 | 
				
			||||||
 | 
					    tunnel: ^0.0.6
 | 
				
			||||||
 | 
					    undici: ^5.25.4
 | 
				
			||||||
 | 
					  checksum: 5d395df575d30ae599efa10dd715e72944b015e753db61f0a823f737acbb0e99743d4a9f25e812b18ec8cc34f86c73565d075c449e01ffa891577b6595212dde
 | 
				
			||||||
 | 
					  languageName: node
 | 
				
			||||||
 | 
					  linkType: hard
 | 
				
			||||||
 | 
					
 | 
				
			||||||
"@actions/io@npm:^1.0.1, @actions/io@npm:^1.1.1, @actions/io@npm:^1.1.3":
 | 
					"@actions/io@npm:^1.0.1, @actions/io@npm:^1.1.1, @actions/io@npm:^1.1.3":
 | 
				
			||||||
  version: 1.1.3
 | 
					  version: 1.1.3
 | 
				
			||||||
  resolution: "@actions/io@npm:1.1.3"
 | 
					  resolution: "@actions/io@npm:1.1.3"
 | 
				
			||||||
@@ -1071,16 +1081,16 @@ __metadata:
 | 
				
			|||||||
  languageName: node
 | 
					  languageName: node
 | 
				
			||||||
  linkType: hard
 | 
					  linkType: hard
 | 
				
			||||||
 | 
					
 | 
				
			||||||
"@docker/actions-toolkit@npm:^0.35.0":
 | 
					"@docker/actions-toolkit@npm:^0.39.0":
 | 
				
			||||||
  version: 0.35.0
 | 
					  version: 0.39.0
 | 
				
			||||||
  resolution: "@docker/actions-toolkit@npm:0.35.0"
 | 
					  resolution: "@docker/actions-toolkit@npm:0.39.0"
 | 
				
			||||||
  dependencies:
 | 
					  dependencies:
 | 
				
			||||||
    "@actions/artifact": ^2.1.8
 | 
					    "@actions/artifact": ^2.1.9
 | 
				
			||||||
    "@actions/cache": ^3.2.4
 | 
					    "@actions/cache": ^3.2.4
 | 
				
			||||||
    "@actions/core": ^1.10.1
 | 
					    "@actions/core": ^1.10.1
 | 
				
			||||||
    "@actions/exec": ^1.1.1
 | 
					    "@actions/exec": ^1.1.1
 | 
				
			||||||
    "@actions/github": ^6.0.0
 | 
					    "@actions/github": ^6.0.0
 | 
				
			||||||
    "@actions/http-client": ^2.2.1
 | 
					    "@actions/http-client": ^2.2.3
 | 
				
			||||||
    "@actions/io": ^1.1.3
 | 
					    "@actions/io": ^1.1.3
 | 
				
			||||||
    "@actions/tool-cache": ^2.0.1
 | 
					    "@actions/tool-cache": ^2.0.1
 | 
				
			||||||
    "@azure/storage-blob": ^12.15.0
 | 
					    "@azure/storage-blob": ^12.15.0
 | 
				
			||||||
@@ -1096,7 +1106,7 @@ __metadata:
 | 
				
			|||||||
    semver: ^7.6.3
 | 
					    semver: ^7.6.3
 | 
				
			||||||
    tar-stream: ^3.1.7
 | 
					    tar-stream: ^3.1.7
 | 
				
			||||||
    tmp: ^0.2.3
 | 
					    tmp: ^0.2.3
 | 
				
			||||||
  checksum: 27fa4a500e94beff376bc322cc1074c82b20f6ceb0104c43ed5efc613763c8b7ea37b231c32c4dfcb5f7ce8a14948eecc799aa363d60d11d848466d5718d63f0
 | 
					  checksum: 9dafe3c3e02f6f78c8da4cfb8bc726ae5eef9b6a2fedfca5d75ee6d6c559745c12aa16587dd595360f76be91803235dc66e0852e595ef7a582506fa0d4402983
 | 
				
			||||||
  languageName: node
 | 
					  languageName: node
 | 
				
			||||||
  linkType: hard
 | 
					  linkType: hard
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -3168,7 +3178,7 @@ __metadata:
 | 
				
			|||||||
  resolution: "docker-setup-buildx@workspace:."
 | 
					  resolution: "docker-setup-buildx@workspace:."
 | 
				
			||||||
  dependencies:
 | 
					  dependencies:
 | 
				
			||||||
    "@actions/core": ^1.10.1
 | 
					    "@actions/core": ^1.10.1
 | 
				
			||||||
    "@docker/actions-toolkit": ^0.35.0
 | 
					    "@docker/actions-toolkit": ^0.39.0
 | 
				
			||||||
    "@types/js-yaml": ^4.0.9
 | 
					    "@types/js-yaml": ^4.0.9
 | 
				
			||||||
    "@types/node": ^20.12.12
 | 
					    "@types/node": ^20.12.12
 | 
				
			||||||
    "@types/uuid": ^10.0.0
 | 
					    "@types/uuid": ^10.0.0
 | 
				
			||||||
@@ -5534,9 +5544,9 @@ __metadata:
 | 
				
			|||||||
  linkType: hard
 | 
					  linkType: hard
 | 
				
			||||||
 | 
					
 | 
				
			||||||
"path-to-regexp@npm:^6.2.0":
 | 
					"path-to-regexp@npm:^6.2.0":
 | 
				
			||||||
  version: 6.2.2
 | 
					  version: 6.3.0
 | 
				
			||||||
  resolution: "path-to-regexp@npm:6.2.2"
 | 
					  resolution: "path-to-regexp@npm:6.3.0"
 | 
				
			||||||
  checksum: b7b0005c36f5099f9ed1fb20a820d2e4ed1297ffe683ea1d678f5e976eb9544f01debb281369dabdc26da82e6453901bf71acf2c7ed14b9243536c2a45286c33
 | 
					  checksum: eca78602e6434a1b6799d511d375ec044e8d7e28f5a48aa5c28d57d8152fb52f3fc62fb1cfc5dfa2198e1f041c2a82ed14043d75740a2fe60e91b5089a153250
 | 
				
			||||||
  languageName: node
 | 
					  languageName: node
 | 
				
			||||||
  linkType: hard
 | 
					  linkType: hard
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user