From 0d248028f37d8c19e6db8ccf94a3d8dbac090897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edu=20G=C3=B3mez=20Escandell?= Date: Tue, 19 Sep 2023 08:45:43 +0200 Subject: [PATCH] Clean up after running --- .github/workflows/qa-azure.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/qa-azure.yaml b/.github/workflows/qa-azure.yaml index 789e47834..f3e5b7324 100644 --- a/.github/workflows/qa-azure.yaml +++ b/.github/workflows/qa-azure.yaml @@ -70,6 +70,20 @@ jobs: if: steps.test.outcome == 'failure' shell: powershell run: Get-Content ".\end-to-end\BuildWindowsAgent.log" + - name: Clean up + if: always() + shell: powershell + run: | + # Clean up artifacts + + # For some reason, this file interferes with setup-go + Remove-Item -Recurse -Path 'C:\actions-runner\_work\_tool\go' -ErrorAction Ignore + + # Remove .gitconfig so that the github URL overrides do not stack + Remove-Item -Recurse -Path "${HOME}\.gitconfig" -ErrorAction Ignore + + # Uninstall Appx + Get-AppxPackage -Name "CanonicalGroupLimited.UbuntuProForWindows" | Remove-AppxPackage -ErrorAction Ignore stop-vm: name: Clean up the Azure VM