use ACTIONS_STEP_DEBUG to determine debug mode, use isTrueString lib function
This commit is contained in:
parent
cd19b6d6ae
commit
b819e6af29
@ -5,6 +5,7 @@ import {
|
|||||||
addCiRegistryAuth,
|
addCiRegistryAuth,
|
||||||
collectTags,
|
collectTags,
|
||||||
executeDockerBuild,
|
executeDockerBuild,
|
||||||
|
isTrueString,
|
||||||
mergeArgRegistryAuthJson,
|
mergeArgRegistryAuthJson,
|
||||||
prepareDestinations,
|
prepareDestinations,
|
||||||
prepareDockerArgs,
|
prepareDockerArgs,
|
||||||
@ -16,8 +17,7 @@ import {
|
|||||||
try {
|
try {
|
||||||
const information = action_information.collect_all(true, false);
|
const information = action_information.collect_all(true, false);
|
||||||
|
|
||||||
const debug = process.env['ACTIONS_STEP_DEBUG'] === '1' || process.env['ACTIONS_STEP_DEBUG'] === 'true';
|
const debug = isTrueString(process.env['ACTIONS_STEP_DEBUG']);
|
||||||
console.log('debug=', debug);
|
|
||||||
|
|
||||||
let targetRegistries = [];
|
let targetRegistries = [];
|
||||||
const repoStr = github.context.repo.owner + '/' + github.context.repo.repo;
|
const repoStr = github.context.repo.owner + '/' + github.context.repo.repo;
|
||||||
|
|||||||
@ -230,3 +230,10 @@ export function executeDockerBuild(dockerArgs, destinations) {
|
|||||||
throw proc.error;
|
throw proc.error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function isTrueString(str) {
|
||||||
|
return str === '1'
|
||||||
|
|| str === 'true'
|
||||||
|
|| str === 'True'
|
||||||
|
|| str === 'TRUE';
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user