From 55b74827f29eeb3f00424bffb08cffc9a0092c6c Mon Sep 17 00:00:00 2001 From: v4hn Date: Mon, 7 Oct 2024 19:06:33 +0200 Subject: [PATCH] do not aggregate on no cache found --- .github/actions/aggregate-worker/action.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/aggregate-worker/action.yaml b/.github/actions/aggregate-worker/action.yaml index 472d32f042..20eabbd8b4 100644 --- a/.github/actions/aggregate-worker/action.yaml +++ b/.github/actions/aggregate-worker/action.yaml @@ -11,6 +11,10 @@ inputs: runs: using: "composite" steps: + - name: Ensure folders exist + run: | + mkdir -p ${{ env.AGG }} + mkdir -p ${{ env.REPO }} - name: Fetch results of ${{ inputs.worker }} id: restore uses: actions/cache/restore@v4 @@ -21,7 +25,8 @@ runs: apt-repo-${{ inputs.stage }}-${{ inputs.worker }}-${{ github.sha }}-${{ github.run_id }} - name: Aggregate files shell: bash - if: ${{ steps.restore.outputs.cache-hit != '' }} + # if ANY cache was found (i.e., the one from this attempt or a previous one) + if: steps.restore.outputs.cache-hit == 'true' || steps.restore.outputs.cache-hit == 'false' run: | cat ${{ env.REPO }}/pkg_build_status.csv >> ${{ env.AGG }}/pkg_build_status.csv cat ${{ env.REPO }}/sources.repos |