diff --git a/action.yml b/action.yml index 98bb1ea..1249ab7 100644 --- a/action.yml +++ b/action.yml @@ -73,7 +73,11 @@ inputs: default: "true" docker_push: - description: "" + description: "Push all build tags to destinations" + default: "true" + + docker_pull: + description: "Always attempt to pull all referenced images" default: "true" use_buildx: diff --git a/dist/index.js b/dist/index.js index cd3eb0c..6efbb0a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -61357,6 +61357,13 @@ function result_to_output(results) { } } +function isTrueString(str) { + return str === '1' + || str === 'true' + || str === 'True' + || str === 'TRUE'; +} + ;// CONCATENATED MODULE: ../information/src/collect_ci.js @@ -61786,12 +61793,10 @@ function collect_all(debug = false, output = false) { console.log(JSON.stringify(lib_github.context, null, 2)); } - const results = { + return { ...collect_ci(debug, output), ...collect_git(debug, output) }; - - return results } @@ -62121,11 +62126,6 @@ function processAdditionalRegistries(targetRegistries) { } } -function base64ToBytes(base64) { - const binString = atob(base64); - return Uint8Array.from(binString, (m) => m.codePointAt(0)); -} - function addCiRegistryAuth(ci_registry, registryAuthJson) { if (!core.getBooleanInput('add_ci_registry_auth')) { return; @@ -62306,6 +62306,9 @@ function executeDockerBuild(dockerArgs, destinations) { if (core.getBooleanInput('docker_push')) { dockerSubCmd += ' --push'; } + if (core.getBooleanInput('docker_pull')) { + dockerSubCmd += ' --pull'; + } const execStr = `docker ${dockerSubCmd} ${dockerArgsStr}`; console.log(`executing: ${execStr}`); @@ -62338,6 +62341,13 @@ function executeDockerBuild(dockerArgs, destinations) { } } +function lib_isTrueString(str) { + return str === '1' + || str === 'true' + || str === 'True' + || str === 'TRUE'; +} + ;// CONCATENATED MODULE: ./src/action.js @@ -62347,9 +62357,8 @@ function executeDockerBuild(dockerArgs, destinations) { try { const information = collect_all(true, false); - let debug = core.getInput('debug') != null ? (!!core.getInput('debug')) : true; - console.log('debug=', debug); - debug = true; + + const debug = lib_isTrueString(process.env['ACTIONS_STEP_DEBUG']); let targetRegistries = []; const repoStr = github.context.repo.owner + '/' + github.context.repo.repo; diff --git a/src/lib.js b/src/lib.js index 8e19b88..870d8d3 100644 --- a/src/lib.js +++ b/src/lib.js @@ -199,6 +199,9 @@ export function executeDockerBuild(dockerArgs, destinations) { if (core.getBooleanInput('docker_push')) { dockerSubCmd += ' --push'; } + if (core.getBooleanInput('docker_pull')) { + dockerSubCmd += ' --pull'; + } const execStr = `docker ${dockerSubCmd} ${dockerArgsStr}`; console.log(`executing: ${execStr}`);