From 6646cf50b46f7d19cb9cffbbe6e3a0d7a533dff4 Mon Sep 17 00:00:00 2001 From: Paul Hinze Date: Fri, 22 Apr 2022 16:51:44 -0500 Subject: [PATCH] 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 --- .github/workflows/spectesting.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/spectesting.yml b/.github/workflows/spectesting.yml index cf3328a4d..edf8add76 100644 --- a/.github/workflows/spectesting.yml +++ b/.github/workflows/spectesting.yml @@ -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 }}