ci: Move always() from step to job so cleanup happens on failures

The `if: always()` can work on steps as well, but in this case we need
it at the job level so it modifies the `needs` clause.

See: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-not-requiring-successful-dependent-jobs
This commit is contained in:
Paul Hinze 2022-04-22 16:51:44 -05:00
parent dc58438476
commit 6646cf50b4
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -78,10 +78,9 @@ jobs:
runs-on: self-hosted
name: Cleanup Post Vagrant-Spec Tests
needs: spec-tests
if: always()
steps:
- name: Clean Packet
if: always()
run: ./.ci/spec/clean-packet.sh
- name: Clean Workspace
if: always()
run: rm -rf ${{ github.workspace }}