Add more info messages to user, rename log printing function
This commit is contained in:
parent
eeee462f05
commit
a758ec55e8
9 changed files with 22 additions and 13 deletions
7
lib/init-action-post.js
generated
7
lib/init-action-post.js
generated
|
|
@ -29,7 +29,7 @@ const actionsUtil = __importStar(require("./actions-util"));
|
|||
const config_utils_1 = require("./config-utils");
|
||||
const debugArtifacts = __importStar(require("./debug-artifacts"));
|
||||
const logging_1 = require("./logging");
|
||||
async function run(uploadDatabaseBundleDebugArtifact, uploadLogsDebugArtifact, uploadFinalLogsDebugArtifact) {
|
||||
async function run(uploadDatabaseBundleDebugArtifact, uploadLogsDebugArtifact, printDebugLogs) {
|
||||
const logger = (0, logging_1.getActionsLogger)();
|
||||
const config = await (0, config_utils_1.getConfig)(actionsUtil.getTemporaryDirectory(), logger);
|
||||
if (config === undefined) {
|
||||
|
|
@ -37,14 +37,15 @@ async function run(uploadDatabaseBundleDebugArtifact, uploadLogsDebugArtifact, u
|
|||
}
|
||||
// Upload appropriate Actions artifacts for debugging
|
||||
if (config === null || config === void 0 ? void 0 : config.debugMode) {
|
||||
core.info("Debug mode is on. Uploading available database bundles and logs as Actions debugging artifacts...");
|
||||
await uploadDatabaseBundleDebugArtifact(config, logger);
|
||||
await uploadLogsDebugArtifact(config);
|
||||
await uploadFinalLogsDebugArtifact(config);
|
||||
await printDebugLogs(config);
|
||||
}
|
||||
}
|
||||
async function runWrapper() {
|
||||
try {
|
||||
await run(debugArtifacts.uploadDatabaseBundleDebugArtifact, debugArtifacts.uploadLogsDebugArtifact, debugArtifacts.uploadFinalLogsDebugArtifact);
|
||||
await run(debugArtifacts.uploadDatabaseBundleDebugArtifact, debugArtifacts.uploadLogsDebugArtifact, debugArtifacts.printDebugLogs);
|
||||
}
|
||||
catch (error) {
|
||||
core.setFailed(`init action cleanup failed: ${error}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue