Skip to content

Commit 2929028

Browse files
authored
fix: final job condition (#107)
1 parent bdb2e15 commit 2929028

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,15 @@ jobs:
163163

164164
final:
165165
needs: [check, build, package, test, release]
166-
if: (!failure() && !cancelled())
166+
if: ${{ always() && (contains(needs.*.result, 'failure') || !failure() && !cancelled()) }}
167167
runs-on: ubuntu-latest
168168
steps:
169169
- name: Final
170-
run: echo "All done"
170+
run: |
171+
if [[ "${{ contains(needs.*.result, 'failure') }}" == "true" ]]
172+
then
173+
echo "Run failed"
174+
exit 1
175+
else
176+
echo "All done"
177+
fi

0 commit comments

Comments
 (0)