Skip to content

Commit 3a98a22

Browse files
committed
chore: even more debug logging
Signed-off-by: Sam Gammon <[email protected]>
1 parent e8ea009 commit 3a98a22

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

dist/cleanup/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cleanup/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ async function setupAgentIfNeeded(
302302

303303
let activeAgent = null
304304
if (agentEnabled && agentManaged) {
305+
core.debug('Agent is active. Preparing state...')
305306
try {
306307
activeAgent = await agentConfig(targetOs)
307308
} catch (err) {
@@ -328,12 +329,15 @@ async function setupAgentIfNeeded(
328329
`Using existing Buildless Agent (already running at PID ${activeAgent.pid}).`
329330
)
330331
}
332+
core.debug('Saving agent state value (pid)')
331333
core.saveState(ActionState.AGENT_PID, activeAgent.pid)
334+
core.debug('Saving agent state value (config)')
332335
core.saveState(ActionState.AGENT_CONFIG, JSON.stringify(activeAgent))
333336
}
334337
}
335338

336339
if (agentEnabled && activeAgent) {
340+
core.debug('Exporting agent variables...')
337341
core.exportVariable(
338342
'BUILDLESS_AGENT',
339343
agentManaged ? 'MANAGED' : 'UNMANAGED'
@@ -465,6 +469,8 @@ export async function install(
465469
await setupAgentIfNeeded(effectiveOptions, withinAction, targetOs)
466470

467471
if (withinAction) {
472+
core.debug('Setting output variables and state')
473+
468474
// mount outputs
469475
core.saveState(ActionState.BINPATH, outputs.path)
470476
core.saveState(
@@ -488,6 +494,7 @@ export async function install(
488494
} else {
489495
core.info(`😔 Buildless agent is not enabled.`)
490496
}
497+
core.debug('Buildless action is done')
491498
return outputs.path
492499
} catch (error) {
493500
// Fail the workflow run if an error occurs

0 commit comments

Comments
 (0)