Reputation: 2631
In my Github Actions, I'm creating some resources in the cloud, and I want to have a job that clean up all my resources.
I saw that the actions, like checkout, they have a Post action. Do we have a post job?
Upvotes: 5
Views: 3923
Reputation: 2481
You can use if always()
to execute a step even if the previous step failed.
Example:
steps:
- name: Git checkout
uses: actions/checkout@v2
... run tests ...
- name: Upload Logs
if: always()
uses: actions/upload-artifact@v1
with:
name: test logs
path: application.log
Upvotes: 6