Skip to content

Commit

Permalink
feat(all):support for considering all workflows with one term (#165)
Browse files Browse the repository at this point in the history
* feat(all):support for considering all workflows with one term

* feat(workflow_id):example workflow added to test all keyword

* feat(workflow_id):Added documentation in README.md

* fix(example): Fixed the token being passed to example workflow

* fix: improvements in comment

Co-authored-by: Steven <[email protected]>

* docs: Fixed grammar in `README.md`

Co-authored-by: Steven <[email protected]>

Co-authored-by: Steven <[email protected]>
  • Loading branch information
anshulsahni and styfle authored Jun 27, 2022
1 parent 9cd53ca commit d2d941c
Show file tree
Hide file tree
Showing 4 changed files with 1,246 additions and 364 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/cancel-all.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
- run: echo 'Sleeping...'; sleep 120; echo 'Done.';
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ 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 `all`, which will cancel all the workflows running in the branch


### Advanced: Pull Requests from Forks

Expand Down
Loading

0 comments on commit d2d941c

Please sign in to comment.