From b48004c2a7a007553307342aaf9fd890059bdada Mon Sep 17 00:00:00 2001 From: rdlrt <3169068+rdlrt@users.noreply.github.com> Date: Fri, 13 Oct 2023 19:13:53 +1100 Subject: [PATCH] Fix github runner cleanup in workflow --- .github/workflows/docker_bin.yml | 5 ++++- .github/workflows/premerge.yml | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_bin.yml b/.github/workflows/docker_bin.yml index 9acd53590..3b13315cc 100644 --- a/.github/workflows/docker_bin.yml +++ b/.github/workflows/docker_bin.yml @@ -35,7 +35,10 @@ jobs: sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel sudo apt-get autoremove -y sudo apt-get clean - sudo rm -rf /usr/share/dotnet + sudo rm -rf "/usr/share/dotnet" + sudo rm -rf "/usr/local/lib/android" + sudo rm -rf "/opt/ghc" + sudo rm -rf "/opt/hostedtoolcache/CodeQL" sudo rm -rf "/usr/local/share/boost" sudo rm -rf "$AGENT_TOOLSDIRECTORY" - name: docker push latest diff --git a/.github/workflows/premerge.yml b/.github/workflows/premerge.yml index be43748fe..6df1d1d25 100644 --- a/.github/workflows/premerge.yml +++ b/.github/workflows/premerge.yml @@ -36,6 +36,7 @@ jobs: sudo rm -rf "/usr/share/dotnet" sudo rm -rf "/usr/local/lib/android" sudo rm -rf "/opt/ghc" + sudo rm -rf "/opt/hostedtoolcache/CodeQL" sudo rm -rf "/usr/local/share/boost" sudo rm -rf "$AGENT_TOOLSDIRECTORY" - name: Login to GitHub Container Registry @@ -48,7 +49,7 @@ jobs: - name: Define BRANCH, COMMIT and G_ACCOUNT in environment run: | echo "G_ACCOUNT=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV - if [[ -z ${{ env.BRANCH }} ]]; then + if [[ -z "${{ env.BRANCH }}" ]]; then echo "BRANCH=${GITHUB_HEAD_REF}" >> $GITHUB_ENV echo "COMMIT=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV else