mirror of
https://github.com/docker/build-push-action.git
synced 2025-07-28 17:55:31 +02:00

1. Checks we have buildx installed 2. Configures a remote builder if we get an address back 3. Uses the already configured builder if we don't get an address back This change does not plumb the dockerfile path through as the entity, and does not differentiate a failed build from a succesful to report to anvil in the post step yet.
44 lines
1.7 KiB
TypeScript
44 lines
1.7 KiB
TypeScript
import * as core from '@actions/core';
|
|
|
|
import { Inputs, sanitizeInputs } from './context';
|
|
|
|
export const tmpDir = process.env['STATE_tmpDir'] || '';
|
|
export const inputs = process.env['STATE_inputs'] ? JSON.parse(process.env['STATE_inputs']) : undefined;
|
|
export const buildRef = process.env['STATE_buildRef'] || '';
|
|
export const isSummarySupported = !!process.env['STATE_isSummarySupported'];
|
|
export const blacksmithBuildTaskId = process.env['STATE_blacksmithBuildTaskId'] || '';
|
|
export const blacksmithClientKey = process.env['STATE_blacksmithClientKey'] || '';
|
|
export const blacksmithClientCaCertificate = process.env['STATE_blacksmithClientCaCertificate'] || '';
|
|
export const blacksmithRootCaCertificate = process.env['STATE_blacksmithRootCaCertificate'] || '';
|
|
|
|
export function setTmpDir(tmpDir: string) {
|
|
core.saveState('tmpDir', tmpDir);
|
|
}
|
|
|
|
export function setInputs(inputs: Inputs) {
|
|
core.saveState('inputs', JSON.stringify(sanitizeInputs(inputs)));
|
|
}
|
|
|
|
export function setBuildRef(buildRef: string) {
|
|
core.saveState('buildRef', buildRef);
|
|
}
|
|
|
|
export function setSummarySupported() {
|
|
core.saveState('isSummarySupported', 'true');
|
|
}
|
|
|
|
export function setBlacksmithBuildTaskId(blacksmithBuildTaskId: string) {
|
|
core.saveState('blacksmithBuildTaskId', blacksmithBuildTaskId);
|
|
}
|
|
|
|
export function setBlacksmithClientKey(blacksmithClientKey: string) {
|
|
core.saveState('blacksmithClientKey', blacksmithClientKey);
|
|
}
|
|
|
|
export function setBlacksmithClientCaCertificate(blacksmithClientCaCertificate: string) {
|
|
core.saveState('blacksmithClientCaCertificate', blacksmithClientCaCertificate);
|
|
}
|
|
|
|
export function setBlacksmithRootCaCertificate(blacksmithRootCaCertificate: string) {
|
|
core.saveState('blacksmithRootCaCertificate', blacksmithRootCaCertificate);
|
|
}
|