diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c05c454..92071a9 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,8 +16,22 @@ env: REPORT_DIR: /tmp/build-report jobs: - test-action: - name: Test action + test-docker-tmp: + name: Test removing root-owned folder + runs-on: ubuntu-latest + steps: + - name: Check out Maximize Build Space action + uses: actions/checkout@v4 + with: + path: ./.github/actions/maximize-test + + - name: Maximize build space + uses: ./.github/actions/maximize-test + with: + build-mount-path: /var/lib/docker/tmp + + determine-free-space: + name: Determine free space with different settings runs-on: ${{ matrix.os }} strategy: @@ -117,7 +131,7 @@ jobs: collect-reports: name: Collect reports runs-on: ubuntu-latest - needs: test-action + needs: determine-free-space env: REPORT_FILE: space-free-report.md diff --git a/action.yml b/action.yml index c03bcbc..b956952 100644 --- a/action.yml +++ b/action.yml @@ -65,13 +65,13 @@ runs: shell: bash run: | echo "Memory and swap:" - free + sudo free echo - swapon --show + sudo swapon --show echo echo "Available storage:" - df -h + sudo df -h echo - name: Maximize build disk space @@ -113,7 +113,7 @@ runs: # ensure mount path exists before the action sudo mkdir -p "${BUILD_MOUNT_PATH}" - find "${BUILD_MOUNT_PATH}" -maxdepth 0 ! -empty -exec echo 'WARNING: directory [{}] is not empty, data loss might occur. Content:' \; -exec ls -al "{}" \; + sudo find "${BUILD_MOUNT_PATH}" -maxdepth 0 ! -empty -exec echo 'WARNING: directory [{}] is not empty, data loss might occur. Content:' \; -exec ls -al "{}" \; echo "Removing unwanted software... " if [[ ${{ inputs.remove-dotnet }} == 'true' ]]; then @@ -189,10 +189,10 @@ runs: shell: bash run: | echo "Memory and swap:" - free + sudo free echo - swapon --show + sudo swapon --show echo echo "Available storage:" - df -h + sudo df -h