diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 90e1d9853c..40399539b8 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -102,16 +102,9 @@ jobs: echo 'CMake target: ${{ matrix.cmake_target }}' echo 'Config name: ${{ matrix.config_name }}' - - name: Clean workspace (MacOS) - if: ${{ inputs.os == 'macos' }} - run: | - WORKSPACE=${{ github.workspace }} - echo "Cleaning workspace '${WORKSPACE}'." - if [ -z "${WORKSPACE}" ] || [ "${WORKSPACE}" = "/" ]; then - echo "Invalid working directory '${WORKSPACE}'." - exit 1 - fi - find "${WORKSPACE}" -depth 1 | xargs rm -rfv + - name: Cleanup workspace + if: ${{ runner.os == 'macOS' }} + uses: XRPLF/actions/.github/actions/cleanup-workspace@3f044c7478548e3c32ff68980eeb36ece02b364e - name: Checkout repository uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0