Skip to content

Commit

Permalink
Write build log to summary
Browse files Browse the repository at this point in the history
  • Loading branch information
int128 committed Jun 5, 2022
1 parent 4384ee4 commit 8ca0024
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@ export const run = async (inputs: Inputs): Promise<Outputs> => {

const outputDir = await fs.mkdtemp(`${os.tmpdir()}/kaniko-action-`)
const args = generateArgs(inputs, outputDir)
await withTime('Built', () => core.group('Build', () => exec.exec('docker', args)))
await withTime('Built', () =>
core.group('Build', async () => {
const output = await exec.getExecOutput('docker', args)
core.summary.addHeading(`kaniko build`)
core.summary.addCodeBlock(`docker ${args.join(' ')}`)
core.summary.addCodeBlock(output.stdout)
})
)
await core.summary.write()

const digest = await readContent(`${outputDir}/digest`)
core.info(digest)
Expand Down

0 comments on commit 8ca0024

Please sign in to comment.