Skip to content

Commit

Permalink
feat: add option to skip summary (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
fkirc authored Oct 8, 2024
1 parent 84931c6 commit 04a1aeb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
concurrent_skipping: 'never'
skip_after_successful_duplicate: 'true'
paths_ignore: '["**/README.md", "**/docs/**"]'
skip_summary: 'true'

main_job:
needs: pre_job
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ inputs:
description: 'One of never, same_content, same_content_newer, outdated_runs, always'
required: true
default: 'never'
skip_summary:
description: 'If true, make the workflow logs shorter'
required: false
default: 'false'
outputs:
should_skip:
description: 'Returns true if the current run should be skipped according to your configured rules'
Expand Down
5 changes: 4 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,10 @@ async function exitSuccess(args: {
)
}
summary.push('</table>')
await core.summary.addRaw(summary.join('')).write()
const skipSummary = core.getBooleanInput("skip_summary")
if (!skipSummary) {
await core.summary.addRaw(summary.join('')).write()
}

core.setOutput('should_skip', args.shouldSkip)
core.setOutput('reason', args.reason)
Expand Down

0 comments on commit 04a1aeb

Please sign in to comment.