From 60ab75fd73fcaedde61064da2fbb279ee56b25c8 Mon Sep 17 00:00:00 2001 From: tomasz-kaminski-sonarsource <79814193+tomasz-kaminski-sonarsource@users.noreply.github.com> Date: Fri, 14 Jan 2022 08:11:23 +0100 Subject: [PATCH] RULEAPI-722: Always cleanup temprary branch for coverage --- .github/workflows/update_coverage.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update_coverage.yml b/.github/workflows/update_coverage.yml index ba704232a1..678057cca6 100644 --- a/.github/workflows/update_coverage.yml +++ b/.github/workflows/update_coverage.yml @@ -46,6 +46,7 @@ jobs: uses: andymckay/cancel-action@0.2 - name: 'Push the updated coverage file to a new branch' + id: create-temp-branch if: steps.gen-coverage.outputs.new_coverage == 'true' working-directory: 'rspec' run: | @@ -78,7 +79,7 @@ jobs: git push origin master - name: 'Delete the temporary branch' - if: steps.gen-coverage.outputs.new_coverage == 'true' + if: always() && steps.create-temp-branch.conclusion == 'success' uses: dawidd6/action-delete-branch@v3 with: github_token: ${{ secrets.GITHUB_TOKEN}}