forked from styfle/cancel-workflow-action
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(all_but_latest): add ability to clear every run but latest
This is an adaptation of styfle#35 from @thomwiggers - the logic is entirely from that PR (thank you!) A new workflow adds a 240-second sleep job on macos (limit 5 concurrent) with manual dispatch available for testing
- Loading branch information
Showing
5 changed files
with
85 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Cancel All But Latest | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
task: | ||
# Use macOS because it has a 5 concurrent job limit: easier to test by manual enqueue | ||
# https://docs.github.com/en/actions/reference/usage-limits-billing-and-administration#usage-limits | ||
runs-on: macos-latest | ||
name: Task | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
- name: Test Step | ||
uses: ./ # Uses an action in the root directory | ||
with: | ||
all_but_latest: true | ||
- run: echo 'Sleeping...'; sleep 240; echo 'Done.'; |
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
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