Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(all):support for considering all workflows with one term #165

Merged
merged 6 commits into from Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/cancel-all.yml
@@ -0,0 +1,20 @@
name: Cancel All Workflows
on: push

# Push again in the same branch
# automatically all the worklows will be cancelled
# To prevent this cancellation, comment this workflow
jobs:
task:
runs-on: ubuntu-latest
name: Task
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Test Step
uses: ./ # Uses an action in the root directory
with:
access_token: ${{ github.token }}
workflow_id: all
- uses: actions/setup-node@v3.3.0
- run: echo 'Sleeping...'; sleep 120; echo 'Done.';
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -54,6 +54,9 @@ jobs:
- _Note_: `workflow_id` can be a Workflow ID (number) or Workflow File Name (string)
- _Note_: `workflow_id` also accepts a comma separated list if you need to cancel multiple workflows

- _Note_: `workflow_id` accepts the value as `all`, which will cancel all the workflows running in the branch
anshulsahni marked this conversation as resolved.
Show resolved Hide resolved


### Advanced: Pull Requests from Forks

The default GitHub token access is unable to cancel workflows for `pull_request`
Expand Down