Skip to content

Commit

Permalink
more debug
Browse files Browse the repository at this point in the history
  • Loading branch information
nonrational committed Feb 27, 2024
1 parent f9f56b5 commit c70d18c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 31 deletions.
28 changes: 13 additions & 15 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62007,28 +62007,26 @@ const run = async () => {
core.info(`Read result '${actualResult}'`)
}

core.info(`[start] setOutput result='${actualResult}'`)
const resultSummary = [
[{data: 'Output', header: true}, {data: 'Result', header: true}],
['result', actualResult],
['cache_key', key],
['cache_outcome', cacheOutcome],
]

core.setOutput('result', actualResult)
core.info('[finish] setOutput')

core.info('[start] core.summary.addTable().write()')
await core.summary
.addTable([
[{data: 'Output', header: true}, {data: 'Result', header: true}],
['result', actualResult],
['cache_key', key],
['cache_outcome', cacheOutcome],
])
.write()
core.info('[finish] core.summary.addTable().write()')
await core.summary.addTable(resultSummary).write()

// https://github.com/actions/toolkit/issues/1578
core.info('All done. Forcing clean exit to avoid process hanging.')
process.exit(0)
} catch(error) {
core.setFailed(error.message)
process.exit(1)
}
}

core.info('[start] run()')
run()
core.info('[finish] run()')

})();

Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

28 changes: 13 additions & 15 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,23 @@ const run = async () => {
core.info(`Read result '${actualResult}'`)
}

core.info(`[start] setOutput result='${actualResult}'`)
const resultSummary = [
[{data: 'Output', header: true}, {data: 'Result', header: true}],
['result', actualResult],
['cache_key', key],
['cache_outcome', cacheOutcome],
]

core.setOutput('result', actualResult)
core.info('[finish] setOutput')

core.info('[start] core.summary.addTable().write()')
await core.summary
.addTable([
[{data: 'Output', header: true}, {data: 'Result', header: true}],
['result', actualResult],
['cache_key', key],
['cache_outcome', cacheOutcome],
])
.write()
core.info('[finish] core.summary.addTable().write()')
await core.summary.addTable(resultSummary).write()

// https://github.com/actions/toolkit/issues/1578
core.info('All done. Forcing clean exit to avoid process hanging.')
process.exit(0)

Check failure on line 56 in src/index.js

View workflow job for this annotation

GitHub Actions / test

'process' is not defined

Check failure on line 56 in src/index.js

View workflow job for this annotation

GitHub Actions / test

'process' is not defined
} catch(error) {
core.setFailed(error.message)
process.exit(1)

Check failure on line 59 in src/index.js

View workflow job for this annotation

GitHub Actions / test

'process' is not defined

Check failure on line 59 in src/index.js

View workflow job for this annotation

GitHub Actions / test

'process' is not defined
}
}

core.info('[start] run()')
run()
core.info('[finish] run()')

0 comments on commit c70d18c

Please sign in to comment.