diff --git a/.github/workflows/sycl_precommit.yml b/.github/workflows/sycl_precommit.yml index bd8080a349ac9..c0d51244c34d0 100644 --- a/.github/workflows/sycl_precommit.yml +++ b/.github/workflows/sycl_precommit.yml @@ -41,6 +41,9 @@ jobs: sparse-checkout: | devops/actions/cached_checkout devops/actions/clang-format + devops/actions/cleanup + - name: Register cleanup after job is finished + uses: ./devops/actions/cleanup - name: 'PR commits + 2' run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 2 ))" >> "${GITHUB_ENV}" - uses: ./devops/actions/cached_checkout diff --git a/devops/actions/cleanup/cleanup.js b/devops/actions/cleanup/cleanup.js index 1dcb5380e3d69..29c002256cd68 100644 --- a/devops/actions/cleanup/cleanup.js +++ b/devops/actions/cleanup/cleanup.js @@ -1,3 +1,4 @@ const path = process.env.GITHUB_WORKSPACE + '/*'; console.log('Cleaning ' + path) require('child_process').execSync('rm -rf ' + path); +require('child_process').execSync('rm -rf ' + process.env.GITHUB_WORKSPACE + '/.git');