diff --git a/.github/workflows/knut-tests.yml b/.github/workflows/knut-tests.yml index dc3e4b60..f785dc72 100644 --- a/.github/workflows/knut-tests.yml +++ b/.github/workflows/knut-tests.yml @@ -123,7 +123,7 @@ jobs: - name: "Delete previous compiler cache" # Updating th cache doesn't work from forks # So update it once it's merged into the repo - if: ${{ steps.compiler-cache-restore.outputs.cache-hit }} + if: ${{ steps.compiler-cache-restore.outputs.cache-hit && github.event_name == 'push' }} continue-on-error: true run: | gh extension install actions/gh-actions-cache @@ -132,6 +132,9 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: "Save Compiler Cache" uses: actions/cache/save@v4 + # Updating th cache doesn't work from forks + # So update it once it's merged into the repo + if: ${{ github.event_name == 'push' }} with: path: ${{ matrix.compiler_cache_path }} key: ${{ matrix.os }}_compiler_cache