diff --git a/action.yml b/action.yml index b5e8def..3abd34c 100644 --- a/action.yml +++ b/action.yml @@ -80,10 +80,6 @@ runs: BUILD_MOUNT_PATH="${GITHUB_WORKSPACE}" fi - # ensure mount path exists - mdkir -p "${BUILD_MOUNT_PATH}" - find "${BUILD_MOUNT_PATH}" -maxdepth 0 ! -empty -exec echo 'WARNING: directory [{}] is not empty, data loss might occur.' \; - echo "Arguments:" echo echo " Root reserve: ${{ inputs.root-reserve-mb }} MiB" @@ -111,6 +107,10 @@ runs: fi echo + # ensure mount path exists + mkdir -p "${BUILD_MOUNT_PATH}" + find "${BUILD_MOUNT_PATH}" -maxdepth 0 ! -empty -exec echo 'WARNING: directory [{}] is not empty, data loss might occur.' \; + echo "Removing unwanted software... " if [[ ${{ inputs.remove-dotnet }} == 'true' ]]; then sudo rm -rf /usr/share/dotnet @@ -179,6 +179,9 @@ runs: sudo chown -R runner "${BUILD_MOUNT_PATH}" sudo chgrp -R runner "${BUILD_MOUNT_PATH}" + # if build mount path is a parent of $GITHUB_WORKSPACE, recreate it + sudo mkdir -p "${GITHUB_WORKSPACE}" + - name: Disk space report after modification shell: bash run: |