Run/Stop If Fails | Succeeded
run even if a previous step fails
YAML
steps:
- name: Build App
run: ./build.sh
- name: Archive Test Results
if: always()
uses: actions/upload-artifact@v1
with:
name: test-results
path: app/build
or as jobs:
If you don't want the function to run when you manually cancel a job, you can instead put:
or
run a function ONLY when something has failed
if a status check function is not used in if, like
the result will (perhaps confusingly) behave like
if: success() is always implied unless you specify always() or failure() - even if you set e.g. if: true
Use success() || failure() instead of always()