debug
This commit is contained in:
parent
82ec3f239f
commit
d4b182543e
22
dist/index.js
vendored
22
dist/index.js
vendored
@ -62095,12 +62095,15 @@ const gBase64 = {
|
|||||||
// and finally,
|
// and finally,
|
||||||
|
|
||||||
|
|
||||||
|
// EXTERNAL MODULE: external "path"
|
||||||
|
var external_path_ = __nccwpck_require__(1017);
|
||||||
;// CONCATENATED MODULE: ./src/lib.js
|
;// CONCATENATED MODULE: ./src/lib.js
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function processAdditionalRegistries(targetRegistries) {
|
function processAdditionalRegistries(targetRegistries) {
|
||||||
const additionalRegistries = core.getInput('additional_registries');
|
const additionalRegistries = core.getInput('additional_registries');
|
||||||
if (additionalRegistries != null && additionalRegistries.length > 0) {
|
if (additionalRegistries != null && additionalRegistries.length > 0) {
|
||||||
@ -62154,7 +62157,7 @@ function mergeArgRegistryAuthJson(registryAuthJson) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (error) {
|
||||||
console.log('Failed to parse registry auth json', e);
|
console.log('Failed to parse registry auth json', e);
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
@ -62162,8 +62165,9 @@ function mergeArgRegistryAuthJson(registryAuthJson) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function writeRegistryAuthJson(registryAuthJson, path) {
|
function writeRegistryAuthJson(registryAuthJson, targetFile) {
|
||||||
external_fs_.writeFileSync(path, JSON.stringify(registryAuthJson, null, 2));
|
external_fs_.mkdirSync(external_path_.dirname(targetFile), {recursive: true});
|
||||||
|
external_fs_.writeFileSync(targetFile, JSON.stringify(registryAuthJson, null, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
function collectTags() {
|
function collectTags() {
|
||||||
@ -62236,7 +62240,9 @@ function prepareDestinations(registries, tags) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
const action_information = collect_all(true, false);
|
|
||||||
|
try {
|
||||||
|
const information = collect_all(true, false);
|
||||||
const debug = !!core.getInput('debug');
|
const debug = !!core.getInput('debug');
|
||||||
|
|
||||||
let targetRegistries = [];
|
let targetRegistries = [];
|
||||||
@ -62244,7 +62250,7 @@ const repoStr = github.context.repo.owner + '/' + github.context.repo.rep
|
|||||||
|
|
||||||
let ci_registry = false;
|
let ci_registry = false;
|
||||||
if (core.getBooleanInput('add_ci_registry_target')) {
|
if (core.getBooleanInput('add_ci_registry_target')) {
|
||||||
ci_registry = action_information.ci_hostname + '/' + repoStr;
|
ci_registry = information.ci_hostname + '/' + repoStr;
|
||||||
targetRegistries.push(ci_registry);
|
targetRegistries.push(ci_registry);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62263,6 +62269,12 @@ const destinations = prepareDestinations(targetRegistries, tags);
|
|||||||
if (debug) {
|
if (debug) {
|
||||||
console.log('destinations:', JSON.stringify(tags, null, 2));
|
console.log('destinations:', JSON.stringify(tags, null, 2));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
console.log('Failed to build docker image', e);
|
||||||
|
core.setFailed(error.message);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|||||||
@ -10,6 +10,8 @@ import {
|
|||||||
writeRegistryAuthJson
|
writeRegistryAuthJson
|
||||||
} from './lib';
|
} from './lib';
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
const information = action_information.collect_all(true, false);
|
const information = action_information.collect_all(true, false);
|
||||||
const debug = !!core.getInput('debug');
|
const debug = !!core.getInput('debug');
|
||||||
|
|
||||||
@ -37,3 +39,9 @@ const destinations = prepareDestinations(targetRegistries, tags);
|
|||||||
if (debug) {
|
if (debug) {
|
||||||
console.log('destinations:', JSON.stringify(tags, null, 2));
|
console.log('destinations:', JSON.stringify(tags, null, 2));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
console.log('Failed to build docker image', e);
|
||||||
|
core.setFailed(error.message);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import * as core from '@actions/core';
|
|||||||
import * as github from '@actions/github';
|
import * as github from '@actions/github';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import {Base64} from 'js-base64';
|
import {Base64} from 'js-base64';
|
||||||
|
import * as path from 'path';
|
||||||
|
|
||||||
export function processAdditionalRegistries(targetRegistries) {
|
export function processAdditionalRegistries(targetRegistries) {
|
||||||
const additionalRegistries = core.getInput('additional_registries');
|
const additionalRegistries = core.getInput('additional_registries');
|
||||||
@ -56,7 +57,7 @@ export function mergeArgRegistryAuthJson(registryAuthJson) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (error) {
|
||||||
console.log('Failed to parse registry auth json', e);
|
console.log('Failed to parse registry auth json', e);
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
@ -64,8 +65,9 @@ export function mergeArgRegistryAuthJson(registryAuthJson) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function writeRegistryAuthJson(registryAuthJson, path) {
|
export function writeRegistryAuthJson(registryAuthJson, targetFile) {
|
||||||
fs.writeFileSync(path, JSON.stringify(registryAuthJson, null, 2));
|
fs.mkdirSync(path.dirname(targetFile), {recursive: true});
|
||||||
|
fs.writeFileSync(targetFile, JSON.stringify(registryAuthJson, null, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
export function collectTags() {
|
export function collectTags() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user