-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Skip duplicate Github Actions runs (#2929) Closes #2929 Skip conditions have been added at the step level for matrix jobs because of: https://github.com/marketplace/actions/skip-duplicate-actions#how-to-use-skip-check-with-required-matrix-jobs * Update the skip_duplicate_workflow_runs workflow Remove the `cancel_others` setting since cancelling workflow runs from outdated commits requires the `actions: write` permission.
- Loading branch information
1 parent
1a3a46a
commit d27820f
Showing
4 changed files
with
94 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Skip Duplicate Workflow Runs | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
paths: | ||
description: 'A JSON-array with path patterns' | ||
default: '[]' | ||
required: false | ||
type: string | ||
outputs: | ||
should_skip: | ||
description: "The output from the skip_duplicate_runs job" | ||
value: ${{ jobs.skip_duplicate_runs.outputs.should_skip }} | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
skip_duplicate_runs: | ||
name: 'Skip Duplicate Runs' | ||
runs-on: ubuntu-latest | ||
outputs: | ||
should_skip: ${{ steps.skip_check.outputs.should_skip }} | ||
steps: | ||
- id: skip_check | ||
uses: fkirc/skip-duplicate-actions@v5.2.0 | ||
with: | ||
paths_ignore: '["**.md"]' | ||
paths: ${{ inputs.paths }} | ||
concurrent_skipping: 'same_content_newer' # skip newer runs with same content | ||
skip_after_successful_duplicate: 'true' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters