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,
|
||||
collectTags,
|
||||
executeDockerBuild,
|
||||
isTrueString,
|
||||
mergeArgRegistryAuthJson,
|
||||
prepareDestinations,
|
||||
prepareDockerArgs,
|
||||
@ -16,8 +17,7 @@ import {
|
||||
try {
|
||||
const information = action_information.collect_all(true, false);
|
||||
|
||||
const debug = process.env['ACTIONS_STEP_DEBUG'] === '1' || process.env['ACTIONS_STEP_DEBUG'] === 'true';
|
||||
console.log('debug=', debug);
|
||||
const debug = isTrueString(process.env['ACTIONS_STEP_DEBUG']);
|
||||
|
||||
let targetRegistries = [];
|
||||
const repoStr = github.context.repo.owner + '/' + github.context.repo.repo;
|
||||
|
||||
@ -230,3 +230,10 @@ export function executeDockerBuild(dockerArgs, destinations) {
|
||||
throw proc.error;
|
||||
}
|
||||
}
|
||||
|
||||
export function isTrueString(str) {
|
||||
return str === '1'
|
||||
|| str === 'true'
|
||||
|| str === 'True'
|
||||
|| str === 'TRUE';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user