Skip to content

Commit 7d21380

Browse files
committed
fail actions on failure step
1 parent 01ea76a commit 7d21380

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/precheck-flight-captain.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,26 +40,29 @@ jobs:
4040

4141
- name: Verify K3S versions - run captain shell script
4242
working-directory: ./scripts
43+
id: k3s_verify
4344
if: ${{ github.event.inputs.k3s_versions != '' }}
4445
run: ./captain.sh -v "${{ github.event.inputs.k3s_versions }}" -d -p "${{ github.event.inputs.page_size }}"
4546
shell: sh
4647
continue-on-error: true
4748

4849
- name: Verify RKE2 versions - run captain shell script
4950
working-directory: ./scripts
51+
id: rke2_verify
5052
if: ${{ github.event.inputs.rke2_versions != '' }}
5153
run: ./captain.sh -v "${{ github.event.inputs.rke2_versions }}" -d -p "${{ github.event.inputs.page_size }}"
5254
shell: sh
5355
continue-on-error: true
5456

5557
- name: Verify LTS RKE2 versions - run captain shell script
5658
working-directory: ./scripts
59+
id: rke2_lts_verify
5760
if: ${{ github.event.inputs.rke2_lts_versions != '' }}
5861
run: ./captain.sh -l "${{ github.event.inputs.rke2_lts_versions }}" -d
5962
shell: sh
6063

6164
- name: Check for previous failures
62-
if: failure()
65+
if: steps.k3s_verify.outcome == 'failure' || steps.rke2_verify.outcome == 'failure' || steps.rke2_lts_verify.outcome == 'failure'
6366
run: |
6467
echo "One or more steps failed, marking job as failed."
6568
exit 1

0 commit comments

Comments
 (0)