Forráskód Böngészése

CI: Set explicit write permission for cache cleanup token

Rémi Verschelde 4 hónapja
szülő
commit
1e5b075f48
1 módosított fájl, 5 hozzáadás és 1 törlés
  1. 5 1
      .github/workflows/cache_cleanup.yml

+ 5 - 1
.github/workflows/cache_cleanup.yml

@@ -1,4 +1,4 @@
-# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#force-deleting-cache-entries
+# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#force-deletion-of-caches-overriding-default-cache-eviction-policy
 name: 🧹 Cache Cleanup
 on:
   pull_request:
@@ -9,6 +9,10 @@ jobs:
   cleanup:
     name: Cleanup PR caches
     runs-on: ubuntu-latest
+    permissions:
+      # `actions:write` permission is required to delete caches
+      actions: write
+      contents: read
     steps:
       - name: Cleanup
         env: