Skip to content

Commit 396739c

Browse files
authored
Merge pull request #5464 from input-output-hk/mgalazyn/fix/fail-ci-when-build-fails
Fix CI gating when required build steps fail
2 parents 4139153 + 80f6e6d commit 396739c

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/haskell.yml

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Haskell Windows & Mac CI
1+
name: Haskell CI
22

33
on:
44
pull_request: # Required for workflows to be able to be approved from forks
@@ -31,7 +31,7 @@ jobs:
3131

3232
env:
3333
# Modify this value to "invalidate" the cabal cache.
34-
CABAL_CACHE_VERSION: "2023-09-05"
34+
CABAL_CACHE_VERSION: "2023-09-11"
3535

3636
# Modify this value to "invalidate" the secp cache.
3737
SECP_CACHE_VERSION: "2022-12-30"
@@ -219,10 +219,18 @@ jobs:
219219

220220
build-complete:
221221
needs: [build]
222+
if: ${{ always() }}
222223
runs-on: ubuntu-latest
223224
steps:
224-
- name: Build complete
225-
run: echo 'Build complete'
225+
- name: Check if any previous job failed
226+
run: |
227+
if [[ "${{ needs.build.result }}" == "failure" ]]; then
228+
# this ignores skipped dependencies
229+
echo 'Required jobs failed to build.'
230+
exit 1
231+
else
232+
echo 'Build complete'
233+
fi
226234
227235
release:
228236
needs: [build]

0 commit comments

Comments
 (0)