diff --git a/.github/actions/purge-runner-disk/action.yml b/.github/actions/purge-runner-disk/action.yml new file mode 100644 index 00000000000..d9bd987bbe9 --- /dev/null +++ b/.github/actions/purge-runner-disk/action.yml @@ -0,0 +1,12 @@ +name: 'purge-runner-disk' +description: 'Free up space on the runner image to prevent out-of-space errors during CI tests' +runs: + using: "composite" + steps: + #Reclaim some disk space on the runner to prevent the WDL tasks from running out of space on the docker. + #https://github.com/actions/runner-images/issues/2840 + - name: Reclaim some runner disk space + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + shell: bash diff --git a/.github/workflows/gatk-tests.yml b/.github/workflows/gatk-tests.yml index 58d074abacc..2f97d560b65 100644 --- a/.github/workflows/gatk-tests.yml +++ b/.github/workflows/gatk-tests.yml @@ -42,6 +42,8 @@ jobs: - name: checkout gatk uses: actions/checkout@v3 + - uses: ./.github/actions/purge-runner-disk + - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v4 @@ -87,6 +89,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 + - uses: ./.github/actions/purge-runner-disk - name: 'Set up java ${{ matrix.Java }}' uses: actions/setup-java@v3 with: @@ -161,6 +164,8 @@ jobs: with: fetch-depth: 0 #TODO make this shallow + - uses: ./.github/actions/purge-runner-disk + - name: 'Set up java ${{ matrix.Java }}' uses: actions/setup-java@v3 with: @@ -250,6 +255,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 + - uses: ./.github/actions/purge-runner-disk - name: Set up java 17 uses: actions/setup-java@v3 with: @@ -270,6 +276,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 + - uses: ./.github/actions/purge-runner-disk - name: Set up java 17 uses: actions/setup-java@v3 with: @@ -292,15 +299,10 @@ jobs: continue-on-error: true name: WDL test ${{ matrix.wdlTest }} on cromwell steps: - #Reclaim some disk space on the runner to prevent the WDL tasks from running out of space on the docker. - #https://stackoverflow.com/questions/75536771/github-runner-out-of-disk-space-after-building-docker-image - - name: Reclaim some runner disk space - run: | - sudo rm -rf /usr/share/dotnet - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - uses: actions/checkout@v3 with: fetch-depth: 0 + - uses: ./.github/actions/purge-runner-disk - name: pull lfs files run: git lfs pull - name: Set up java 17