Skip to content

Commit

Permalink
Disable cancellation by default (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
fkirc authored Mar 16, 2021
1 parent b68a254 commit 4c656bb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ Sometimes, there are workflows that you do not want to run twice at the same tim
Therefore, `skip-duplicate-actions` provides the following options to skip a workflow-run if the same workflow is already running:

- **Always skip:** This is useful if you have a workflow that you never want to run twice at the same time.
In contrast to the [cancel_others](#cancel-outdated-workflow-runs) option, this option allows older runs to finish.
- **Only skip same content:** For example, this can be useful if a workflow has both a `push` and a `pull_request` trigger, or if you push a tag right after pushing a commit.
- **Only skip outdated runs:** For example, this can be useful for skip-checks that are not at the beginning of a job.
In contrast to the [cancel_others](#cancel-outdated-workflow-runs) option, this option skips at pre-defined places instead of cancelling at arbitrary places.
- **Never skip:** This disables the concurrent skipping functionality, but still lets you use all other options like duplicate skipping.

## Skip ignored paths
Expand Down Expand Up @@ -86,7 +84,7 @@ Default `[]`.

### `cancel_others`

If true, then workflow-runs from outdated commits will be cancelled. Default `true`.
If true, then workflow-runs from outdated commits will be cancelled. Default `false`.

### `skip_after_successful_duplicate`

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ inputs:
cancel_others:
description: 'If true, then workflow-runs from outdated commits will be cancelled'
required: false
default: 'true'
default: 'false'
skip_after_successful_duplicate:
description: 'If true, skip if an already finished duplicate run can be found'
required: false
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9972,7 +9972,7 @@ async function main() {
core.warning(`Failed to fetch the required workflow information`);
exitSuccess({ shouldSkip: false });
}
const cancelOthers = getBooleanInput('cancel_others', true);
const cancelOthers = getBooleanInput('cancel_others', false);
if (cancelOthers) {
await cancelOutdatedRuns(context);
}
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ async function main() {
exitSuccess({shouldSkip: false});
}

const cancelOthers = getBooleanInput('cancel_others', true);
const cancelOthers = getBooleanInput('cancel_others', false);
if (cancelOthers) {
await cancelOutdatedRuns(context);
}
Expand Down

0 comments on commit 4c656bb

Please sign in to comment.