You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/actions/learn-github-actions/expressions.md
+8-20Lines changed: 8 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -324,34 +324,22 @@ steps:
324
324
if: {% raw %}${{ failure() }}{% endraw %}
325
325
```
326
326
327
-
{% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %}
328
-
### Evaluate Status Explicitly
327
+
#### failure with conditions
329
328
330
-
Instead of using one of the methods above, you can evaluate the status of the job or composite action that is executing the step directly:
329
+
You can include extra conditions for a step to run after a failure, but you must still include `failure()` to override the default status check of `success()` that is automatically applied to `if` conditions that don't contain a status check function.
331
330
332
-
#### Example for workflow step
331
+
##### Example
333
332
334
333
```yaml
335
334
steps:
336
335
...
337
-
- name: The job has failed
338
-
if: {% raw %}${{ job.status == 'failure' }}{% endraw %}
0 commit comments