-
-
Notifications
You must be signed in to change notification settings - Fork 3
33 lines (29 loc) · 1.05 KB
/
status-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions
name: Status Check
on: push
jobs:
success:
runs-on: ubuntu-latest
steps:
- run: echo ${{ job.status }}
- if: success()
run: echo "Returns true when none of the previous steps have failed or been canceled."
always:
runs-on: ubuntu-latest
steps:
- run: echo ${{ job.status }}
- if: always()
run: echo "Causes the step to always execute, and returns true, even when canceled. A job or step will not run when a critical failure prevents the task from running."
cancelled:
runs-on: ubuntu-latest
steps:
- run: echo ${{ job.status }}
- if: cancelled()
run: echo "Returns true if the workflow was canceled."
failure:
runs-on: ubuntu-latest
steps:
- run: echo ${{ job.status }}
# - run: exit 1
- if: failure()
run: echo "Returns true when any previous step of a job fails. If you have a chain of dependent jobs, failure() returns true if any ancestor job fails."