diff --git a/.github/workflows/premerge.yml b/.github/workflows/premerge.yml index a7329beb5..6aff5f2f0 100644 --- a/.github/workflows/premerge.yml +++ b/.github/workflows/premerge.yml @@ -26,11 +26,18 @@ jobs: - name: Maximize build space uses: easimon/maximize-build-space@master with: - root-reserve-mb: 512 + root-reserve-mb: 30720 swap-size-mb: 1024 remove-dotnet: 'true' remove-android: 'true' remove-haskell: ' true' + remove-codeql: 'true' + - name: Provide additional free space + run: | + # Workaround to provide additional free space for builds + # https://github.com/actions/virtual-environments/issues/2840 + sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /usr/local/share/boost "$AGENT_TOOLSDIRECTORY" + df -h - name: Login to GitHub Container Registry uses: docker/login-action@v2 with: @@ -41,7 +48,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