From d6d15c30fc918e17203b8f9392a27c4a0d44b9b5 Mon Sep 17 00:00:00 2001 From: Gary Buhrmaster Date: Fri, 22 Mar 2024 22:28:57 +0000 Subject: [PATCH] Provide the cache clean action the permission it needs The github workflow to clean up PR caches failed with: Error: Resource not accessible by integration The issue is that the gh-actions-cleanup requires the permission to delete caches, per: https://github.com/actions/gh-actions-cache/issues/85 --- .github/workflows/cleanup-pr-caches.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cleanup-pr-caches.yml b/.github/workflows/cleanup-pr-caches.yml index c3dc863ba8f..f8e33b29952 100644 --- a/.github/workflows/cleanup-pr-caches.yml +++ b/.github/workflows/cleanup-pr-caches.yml @@ -9,7 +9,8 @@ # useful. Delete them. # # Code copied from: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#force-deleting-cache-entries -# +# modified based on: https://github.com/actions/gh-actions-cache/issues/85 +# name: Cleanup caches after PR closed @@ -21,6 +22,8 @@ on: # yamllint disable-line rule:truthy jobs: cleanup: runs-on: ubuntu-latest + permissions: + actions: write steps: - name: Cleanup run: |