2020-08-18 15:40:31 +00:00
|
|
|
import * as core from '@actions/core';
|
|
|
|
|
|
|
|
export const IsPost = !!process.env['STATE_isPost'];
|
2021-04-23 20:08:40 +00:00
|
|
|
export const IsDebug = !!process.env['STATE_isDebug'];
|
2022-04-17 15:22:03 +00:00
|
|
|
export const standalone = process.env['STATE_standalone'] || '';
|
2020-08-18 15:40:31 +00:00
|
|
|
export const builderName = process.env['STATE_builderName'] || '';
|
2021-04-23 20:08:40 +00:00
|
|
|
export const containerName = process.env['STATE_containerName'] || '';
|
2022-09-22 00:48:11 +00:00
|
|
|
export const credsDir = process.env['STATE_credsDir'] || '';
|
2021-04-23 20:08:40 +00:00
|
|
|
|
|
|
|
export function setDebug(debug: string) {
|
|
|
|
core.saveState('isDebug', debug);
|
|
|
|
}
|
2020-08-18 15:40:31 +00:00
|
|
|
|
2022-04-17 15:22:03 +00:00
|
|
|
export function setStandalone(standalone: boolean) {
|
|
|
|
core.saveState('standalone', standalone);
|
|
|
|
}
|
|
|
|
|
2020-08-18 15:40:31 +00:00
|
|
|
export function setBuilderName(builderName: string) {
|
|
|
|
core.saveState('builderName', builderName);
|
|
|
|
}
|
|
|
|
|
2021-04-23 20:08:40 +00:00
|
|
|
export function setContainerName(containerName: string) {
|
|
|
|
core.saveState('containerName', containerName);
|
|
|
|
}
|
|
|
|
|
2022-09-22 00:48:11 +00:00
|
|
|
export function setCredsDir(credsDir: string) {
|
|
|
|
core.saveState('credsDir', credsDir);
|
|
|
|
}
|
|
|
|
|
2020-08-18 15:40:31 +00:00
|
|
|
if (!IsPost) {
|
|
|
|
core.saveState('isPost', 'true');
|
|
|
|
}
|