From c9f477f810b376d0c343a47959422526e559dd5d Mon Sep 17 00:00:00 2001 From: Christopher Bartz Date: Tue, 16 Dec 2025 12:12:27 +0100 Subject: [PATCH 1/3] add verbose logging --- src/index.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/index.js b/src/index.js index bc24d35..5b8ce8d 100644 --- a/src/index.js +++ b/src/index.js @@ -30,6 +30,10 @@ const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms)); export async function run() { try { + // Enable debug logging by default + process.env.ACTIONS_STEP_DEBUG = "true"; + core.debug("Debug logging enabled by default"); + /* Indicates whether the POST action is running */ if (!!core.getState('isPost')) { const message = core.getState('message') @@ -37,7 +41,7 @@ export async function run() { if (tmate && message) { const shutdown = async () => { core.error('Got signal') - await execShellCommand(`${tmate} kill-session`) + await execShellCommand(`${tmate} -vv kill-session`) process.exit(1) } // This is needed to fully support canceling the post-job Action, for details see @@ -50,7 +54,7 @@ export async function run() { return async () => { return result ||= !didTmateQuit() - && '0' !== await execShellCommand(`${tmate} display -p '#{tmate_num_clients}'`, { quiet: true }) + && '0' !== await execShellCommand(`${tmate} -vv display -p '#{tmate_num_clients}'`, { quiet: true }) } })() @@ -179,15 +183,15 @@ export async function run() { } core.debug("Creating new session") - await execShellCommand(`${tmate} ${newSessionExtra} ${setDefaultCommand} new-session -d`); - await execShellCommand(`${tmate} wait tmate-ready`); + await execShellCommand(`${tmate} -vv ${newSessionExtra} ${setDefaultCommand} new-session -d`); + await execShellCommand(`${tmate} -vv wait tmate-ready`); core.debug("Created new session successfully") core.debug("Fetching connection strings") - const tmateSSH = await execShellCommand(`${tmate} display -p '#{tmate_ssh}'`); + const tmateSSH = await execShellCommand(`${tmate} -vv display -p '#{tmate_ssh}'`); const [, , tokenHost] = tmateSSH.split(" "); const [token,] = tokenHost.split("@") - const tmateWeb = await execShellCommand(`${tmate} display -p '#{tmate_web}'`); + const tmateWeb = await execShellCommand(`${tmate} -vv display -p '#{tmate_web}'`); /* * Publish a variable so that when the POST action runs, it can determine From 77cbd09bf28348e9b04e24f4d5b8506886159a93 Mon Sep 17 00:00:00 2001 From: Christopher Bartz Date: Tue, 16 Dec 2025 12:49:12 +0100 Subject: [PATCH 2/3] checkin build --- lib/index.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/index.js b/lib/index.js index 473692d..2a361cc 100644 --- a/lib/index.js +++ b/lib/index.js @@ -13591,6 +13591,10 @@ const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms)); async function run() { try { + // Enable debug logging by default + (external_process_default()).env.ACTIONS_STEP_DEBUG = "true"; + core.debug("Debug logging enabled by default"); + /* Indicates whether the POST action is running */ if (!!core.getState('isPost')) { const message = core.getState('message') @@ -13598,7 +13602,7 @@ async function run() { if (tmate && message) { const shutdown = async () => { core.error('Got signal') - await execShellCommand(`${tmate} kill-session`) + await execShellCommand(`${tmate} -vv kill-session`) external_process_default().exit(1) } // This is needed to fully support canceling the post-job Action, for details see @@ -13611,7 +13615,7 @@ async function run() { return async () => { return result ||= !didTmateQuit() - && '0' !== await execShellCommand(`${tmate} display -p '#{tmate_num_clients}'`, { quiet: true }) + && '0' !== await execShellCommand(`${tmate} -vv display -p '#{tmate_num_clients}'`, { quiet: true }) } })() @@ -13740,15 +13744,15 @@ async function run() { } core.debug("Creating new session") - await execShellCommand(`${tmate} ${newSessionExtra} ${setDefaultCommand} new-session -d`); - await execShellCommand(`${tmate} wait tmate-ready`); + await execShellCommand(`${tmate} -vv ${newSessionExtra} ${setDefaultCommand} new-session -d`); + await execShellCommand(`${tmate} -vv wait tmate-ready`); core.debug("Created new session successfully") core.debug("Fetching connection strings") - const tmateSSH = await execShellCommand(`${tmate} display -p '#{tmate_ssh}'`); + const tmateSSH = await execShellCommand(`${tmate} -vv display -p '#{tmate_ssh}'`); const [, , tokenHost] = tmateSSH.split(" "); const [token,] = tokenHost.split("@") - const tmateWeb = await execShellCommand(`${tmate} display -p '#{tmate_web}'`); + const tmateWeb = await execShellCommand(`${tmate} -vv display -p '#{tmate_web}'`); /* * Publish a variable so that when the POST action runs, it can determine From bea7ed9c8ea78088ecea68121dcac8e68e1a7286 Mon Sep 17 00:00:00 2001 From: Christopher Bartz Date: Tue, 16 Dec 2025 14:15:42 +0100 Subject: [PATCH 3/3] checkin verbose mode --- lib/index.js | 1 + src/index.js | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/index.js b/lib/index.js index 2a361cc..3c504b9 100644 --- a/lib/index.js +++ b/lib/index.js @@ -13593,6 +13593,7 @@ async function run() { try { // Enable debug logging by default (external_process_default()).env.ACTIONS_STEP_DEBUG = "true"; + core.info("running test/tmate-verbose") core.debug("Debug logging enabled by default"); /* Indicates whether the POST action is running */ diff --git a/src/index.js b/src/index.js index 5b8ce8d..6fef4d9 100644 --- a/src/index.js +++ b/src/index.js @@ -32,6 +32,7 @@ export async function run() { try { // Enable debug logging by default process.env.ACTIONS_STEP_DEBUG = "true"; + core.info("running test/tmate-verbose") core.debug("Debug logging enabled by default"); /* Indicates whether the POST action is running */