-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
related to #840 skipping already finished workflows, NOT concurrent (different PR) I've been doing investigations about canceling workflows (https://github.com/fkirc/skip-duplicate-actions). The action works by checking in pre_job whether the pipe has already been run. Then in the main job there is a condition that either continues processing or skips the job. This results in ALWAYS running all workflows, even duplicate ones. The difference is that the duplicates will terminate at a different point. We will still see a lot of green runs. It's a bit different than I imagined (not starting or CANCEL the duplicate at all). I found out that I can cancel the workflow programmatically via HTTP POST. So if we create different custom ction, we can cancel on top and probably delete cancelled job. Signed-off-by: kuritka <[email protected]>
- Loading branch information
Showing
4 changed files
with
56 additions
and
0 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 |
---|---|---|
|
@@ -15,9 +15,23 @@ on: | |
- '**.drawio' | ||
- '.spelling' | ||
jobs: | ||
skip-check: | ||
runs-on: ubuntu-latest | ||
name: Skip the job? | ||
outputs: | ||
should_skip: ${{ steps.skip_check.outputs.should_skip }} | ||
steps: | ||
- id: skip_check | ||
uses: fkirc/[email protected] | ||
with: | ||
skip_after_successful_duplicate: 'true' | ||
do_not_skip: '["workflow_dispatch", "schedule"]' | ||
|
||
go-inspect: | ||
name: Inspect packages | ||
runs-on: ubuntu-20.04 | ||
needs: skip-check | ||
if: ${{ needs.skip-check.outputs.should_skip != 'true' }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
# see: https://golangci-lint.run/usage/configuration/#config-file | ||
|
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 |
---|---|---|
|
@@ -17,8 +17,22 @@ on: | |
- '.spelling' | ||
|
||
jobs: | ||
skip-check: | ||
runs-on: ubuntu-latest | ||
name: Skip the job? | ||
outputs: | ||
should_skip: ${{ steps.skip_check.outputs.should_skip }} | ||
steps: | ||
- id: skip_check | ||
uses: fkirc/[email protected] | ||
with: | ||
skip_after_successful_duplicate: 'true' | ||
do_not_skip: '["workflow_dispatch", "schedule"]' | ||
|
||
terratest-n-clusters: | ||
runs-on: ubuntu-20.04 | ||
needs: skip-check | ||
if: ${{ needs.skip-check.outputs.should_skip != 'true' }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
|
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 |
---|---|---|
|
@@ -17,8 +17,22 @@ on: | |
- '.spelling' | ||
|
||
jobs: | ||
skip-check: | ||
runs-on: ubuntu-latest | ||
name: Skip the job? | ||
outputs: | ||
should_skip: ${{ steps.skip_check.outputs.should_skip }} | ||
steps: | ||
- id: skip_check | ||
uses: fkirc/[email protected] | ||
with: | ||
skip_after_successful_duplicate: 'true' | ||
do_not_skip: '["workflow_dispatch", "schedule"]' | ||
|
||
terratest: | ||
runs-on: ubuntu-20.04 | ||
needs: skip-check | ||
if: ${{ needs.skip-check.outputs.should_skip != 'true' }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
|
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 |
---|---|---|
|
@@ -17,8 +17,22 @@ on: | |
- '.spelling' | ||
|
||
jobs: | ||
skip-check: | ||
runs-on: ubuntu-latest | ||
name: Skip the job? | ||
outputs: | ||
should_skip: ${{ steps.skip_check.outputs.should_skip }} | ||
steps: | ||
- id: skip_check | ||
uses: fkirc/[email protected] | ||
with: | ||
skip_after_successful_duplicate: 'true' | ||
do_not_skip: '["workflow_dispatch", "schedule"]' | ||
|
||
upgrade-testing: | ||
runs-on: ubuntu-20.04 | ||
needs: skip-check | ||
if: ${{ needs.skip-check.outputs.should_skip != 'true' }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
|