Skip to content

Commit

Permalink
Merge pull request #33 from easimon/fix/allow-removal-of-workspace-di…
Browse files Browse the repository at this point in the history
…rectory

Fix/allow removal of workspace directory
  • Loading branch information
easimon authored Nov 27, 2023
2 parents 6682ea5 + 62d379b commit 69e8e45
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
echo "FREE_GIG_BEFORE=$(df --output=avail --sync -BG "${{ github.workspace }}" | tail -1 | sed 's/[^0-9]*//g')" >> $GITHUB_ENV
- name: Check out Maximize Build Space action
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ./.github/actions/maximize-test

Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
path: ${{ env.REPORT_DIR }}/${{ env.REPORT_FILE }}

- name: Checkout report branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: test-report

Expand Down
7 changes: 7 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,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. Content:' \; -exec ls -al "{}" \;
echo "Removing unwanted software... "
if [[ ${{ inputs.remove-dotnet }} == 'true' ]]; then
sudo rm -rf /usr/share/dotnet
Expand Down Expand Up @@ -181,6 +185,9 @@ runs:
sudo mount "/dev/mapper/${VG_NAME}-buildlv" "${BUILD_MOUNT_PATH}"
sudo chown -R "${{ inputs.build-mount-path-ownership }}" "${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: |
Expand Down

0 comments on commit 69e8e45

Please sign in to comment.