Skip to content

Commit d95b2cd

Browse files
committed
Cancel build if one step fails
1 parent bc9b6a7 commit d95b2cd

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ env:
2929
permissions:
3030
packages: write
3131
contents: read
32+
actions: write
3233

3334
jobs:
3435
build_and_publish_windows:
@@ -87,6 +88,15 @@ jobs:
8788
path: ${{ env.ARTIFACT_OUTPUT }}
8889
if-no-files-found: error
8990

91+
- name: "Cancel self, we failed"
92+
if: ${{ failure() }}
93+
uses: potiuk/cancel-workflow-runs@master
94+
with:
95+
cancelMode: self
96+
cancelFutureDuplicates: false
97+
selfPreservation: false
98+
token: ${{ secrets.GITHUB_TOKEN }}
99+
90100
build_and_publish_linux:
91101
name: Build and publish app on Linux - (${{ matrix.type }})
92102
strategy:
@@ -142,3 +152,12 @@ jobs:
142152
name: SubZero Framework - Linux ${{ matrix.type }} SKIA
143153
path: ${{ env.ARTIFACT_OUTPUT }}
144154
if-no-files-found: error
155+
156+
- name: "Cancel self, we failed"
157+
if: ${{ failure() }}
158+
uses: potiuk/cancel-workflow-runs@master
159+
with:
160+
cancelMode: self
161+
cancelFutureDuplicates: false
162+
selfPreservation: false
163+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)