diff --git a/.github/workflows/cleanup-caches.yml b/.github/workflows/cleanup-caches.yml index 81a852414f..9d2c0cc671 100644 --- a/.github/workflows/cleanup-caches.yml +++ b/.github/workflows/cleanup-caches.yml @@ -1,6 +1,10 @@ name: Cleanup github runner caches on closed pull requests on: - pull_request: + # pull_request_target is required so fork PRs can delete their own caches on close. + # pull_request from a fork ships a read-only GITHUB_TOKEN regardless of the + # permissions: block, causing gh cache delete to fail with HTTP 403. + # Safe here: no PR code is checked out, the workflow only calls gh cache list/delete. + pull_request_target: types: - closed diff --git a/.github/workflows/test-smokes.yml b/.github/workflows/test-smokes.yml index c757f143d9..a5146bb1df 100644 --- a/.github/workflows/test-smokes.yml +++ b/.github/workflows/test-smokes.yml @@ -223,7 +223,7 @@ jobs: version: "1.12.5" - name: Load Julia packages from cache - uses: julia-actions/cache@v2 + uses: julia-actions/cache@v3 with: cache-name: julia-cache;workflow=${{ github.workflow }};job=${{ github.job }};julia=${{ steps.setup-julia.outputs.julia-version }}