From: Tom Hromatka Date: Tue, 7 Dec 2021 16:36:51 +0000 (-0700) Subject: github: Force a fresh clone on all self-hosted runners X-Git-Tag: v3.0~255^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6dae0be9f4d195f986a3ed6adbbdbb41a659a91;p=thirdparty%2Flibcgroup.git github: Force a fresh clone on all self-hosted runners The cgroup v2 job is being run on a self-hosted runner that re-uses the workspace. Delete the local workspace on all self-hosted runners prior to cloning the repo. Signed-off-by: Tom Hromatka --- diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index d43e0ebb..3586d029 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -23,6 +23,17 @@ name: Continuous Integration on: ["push", "pull_request"] jobs: + # Thanks to github user @martyrs + # https://github.community/t/how-to-properly-clean-up-self-hosted-runners/128909/3 + cleaner: + name: Delete Self-Hosted Runner Workspaces + runs-on: self-hosted + steps: + - name: Delete workspace path + run: | + echo "Cleaning up previous run" + rm -rf "${{ github.workspace }}" + unittests: name: Unit Tests runs-on: ubuntu-latest @@ -163,6 +174,7 @@ jobs: functionaltestsv2: name: Cgroup v2 Functional Tests + needs: [cleaner] runs-on: self-hosted steps: