<t>You can add<br/>
<br/>
if: always()<br/>
<br/>
```<br/>
<br/>
to your step to have it run even if a previous step fails<br/>
[https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions](https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions)<br/>
<br/>
so for a single step it would look like this:<br/>
<br/>
```<br/>
steps:<br/>
- name: Build App<br/>
run: ./build.sh<br/>
<br/>
- name: Archive Test Results<br/>
if: always()<br/>
uses: actions/upload-artifact@v1<br/>
with:<br/>
name: test-results<br/>
path: app/build<br/>
<br/>
```<br/>
<br/>
Or you can add it to a job:<br/>
<br/>
```<br/>
jobs:<br/>
job1:<br/>
job2:<br/>
needs: job1<br/>
job3:<br/>
if: always()<br/>
needs: [job1, job2]<br/>
<br/>
```<br/>
<br/>
Additionally, as pointed out below, putting `always()` will cause the function to run even if the build is canceled. If you don't want the function to run when you manually cancel a job, you can instead put:<br/>
<br/>
```<br/>
if: success() || failure()<br/>
<br/>
```<br/>
<br/>
or<br/>
<br/>
```<br/>
if: '!cancelled()'<br/>
<br/>
```<br/>
<br/>
(Quotes are needed so that `!cancelled()` is not interpreted as a YAML tag.)<br/>
<br/>
Likewise, if you want to run a function ONLY when something has failed, you can put:<br/>
<br/>
```<br/>
if: failure()<br/>
<br/>
```<br/>
<br/>
Also, as mentioned in the comments, if a status check function is not used in `if`, like<br/>
<br/>
```<br/>
if: true<br/>
<br/>
```<br/>
<br/>
the result will (perhaps confusingly) behave like<br/>
<br/>
```<br/>
if: success() && true<br/>
<br/>
```<br/>
<br/>
This is documented in [Expressions - GitHub Docs](https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions):<br/>
<br/>
## Status check functions<br/>
<br/>
You can use the following status check functions as expressions in if conditionals. A default status check of `success()` is applied unless you include one of these functions.</t>