Skip to content

Commit

Permalink
Added cleanup steps
Browse files Browse the repository at this point in the history
  • Loading branch information
DanilBaibak committed Jan 19, 2024
1 parent 54c89d7 commit 88caaef
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/linux_job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,24 @@ jobs:
path: ${{ env.RUNNER_TEST_RESULTS_DIR }}
fail-on-empty: false

- name: Chown repository directory
if: always()
uses: ./test-infra/.github/actions/chown-directory
with:
directory: ${{ github.workspace }}/${{ env.repository }}
ALPINE_IMAGE: ${{ inputs.runner == 'linux.arm64.2xlarge' && 'arm64v8/alpine' || '308535385114.dkr.ecr.us-east-1.amazonaws.com/tool/alpine' }}
- name: Check directory owner
run: |
ls -la ${{ github.workspace }}/${{ env.repository }}
- name: Teardown Linux
if: ${{ always() }}
uses: ./test-infra/.github/actions/teardown-linux

- name: Clean workspace after tear down
if: ${{ always() }}
env:
NO_SUDO: ${{ inputs.no-sudo }}
REPOSITORY: ${{ inputs.repository || github.repository }}
run: |
set +e
if [[ "${NO_SUDO}" == "false" ]]; then
sudo rm -rf "${GITHUB_WORKSPACE:?}/${REPOSITORY:?}"
else
rm -rf "${GITHUB_WORKSPACE:?}/${REPOSITORY:?}"
fi
set -e

0 comments on commit 88caaef

Please sign in to comment.