Skip to content

Commit

Permalink
Provide the cache clean action the permission it needs
Browse files Browse the repository at this point in the history
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:
actions/gh-actions-cache#85
  • Loading branch information
garybuhrmaster committed Mar 22, 2024
1 parent abfbd29 commit d6d15c3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/cleanup-pr-caches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -21,6 +22,8 @@ on: # yamllint disable-line rule:truthy
jobs:
cleanup:
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- name: Cleanup
run: |
Expand Down

0 comments on commit d6d15c3

Please sign in to comment.