Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jobs:
concurrent_skipping: 'never'
skip_after_successful_duplicate: 'true'
paths_ignore: '["**/README.md", "**/docs/**"]'
skip_summary: 'true'

main_job:
needs: pre_job
Expand Down
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,6 @@ jobs:

### Example 3: Skip using `paths_filter`

> [!WARNING]
> If the paths_filter option is not working correctly, then you could copy the “example 1" multiple times according to your needs (see <https://github.com/fkirc/skip-duplicate-actions/issues/326> for details).


The `paths_filter` option can be used if you have multiple jobs in a workflow and want to skip them based on different [`paths_ignore`](#paths_ignore) / [`paths`](#paths) patterns. When defining such filters, the action returns corresponding information in the [`paths_result`](#paths_result) output.
For example in a monorepo, you might want to run jobs related to the "frontend" only if some files in the corresponding "frontend/" folder have changed and the same for "backend". This can be achieved with the following configuration:

Expand Down Expand Up @@ -332,7 +328,7 @@ jobs:
# If 'skip-duplicate-actions' terminates before the paths checks are performed (for example, when a successful duplicate run has
# been found) 'paths_result' outputs an empty object ('{}'). This can be easily intercepted in the if condition of a job
# by checking the result of the "global" 'should_skip' output first.
if: needs.pre_job.outputs.should_skip != 'true' && !fromJSON(needs.pre_job.outputs.paths_result).frontend.should_skip
if: needs.pre_job.outputs.should_skip != 'true' || !fromJSON(needs.pre_job.outputs.paths_result).frontend.should_skip
# ...

backend:
Expand Down
4 changes: 0 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ 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: 1 addition & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,10 +456,7 @@ function exitSuccess(args) {
summary.push('<tr>', '<td>Changed Files</td>', `<td>${changedFiles}</td>`, '</tr>');
}
summary.push('</table>');
const skipSummary = core.getBooleanInput("skip_summary");
if (!skipSummary) {
yield core.summary.addRaw(summary.join('')).write();
}
yield core.summary.addRaw(summary.join('')).write();
core.setOutput('should_skip', args.shouldSkip);
core.setOutput('reason', args.reason);
core.setOutput('skipped_by', args.skippedBy || {});
Expand Down
5 changes: 1 addition & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -631,10 +631,7 @@ async function exitSuccess(args: {
)
}
summary.push('</table>')
const skipSummary = core.getBooleanInput("skip_summary")
if (!skipSummary) {
await core.summary.addRaw(summary.join('')).write()
}
await core.summary.addRaw(summary.join('')).write()

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