Open iskunk opened 6 months ago
I think you need to add actions:write
permission
I think you need to add
actions:write
permission
I've confirmed that adding
permissions:
actions: write
to the job definition allows the action to work:
Run prantlf/delete-cache-action@9cd92c11982e90fb8d4be915fa53ba7aa213564f
with:
key: state-v9380131933
token: ***
Delete cache with key "state-v9380131933"
DELETE https://api.github.com/repos/iskunk/ungoogled-chromium-debian/actions/caches?key=state-v9380131933
1 item deleted
However, there are two problems with this approach:
delete-cache-action
. (I tried adding it to the step, but this fails with an "Invalid workflow file" error);token
argument, but this is implied to be needed when accessing caches belonging to a different repository.Is it correct behavior that a workflow can create a cache item with the default permissions, but requires greater access to delete one? That doesn't seem to follow.
Hello, I am trying to make use of
delete-cache-action
to help keep cache storage usage down.My job first restores a cache from a previous run, then creates a new version of that cache, and then (in theory) deletes the original version. However, the third step is failing with a 403 error. Below are the relevant excerpts from the workflow log..
Restore cache version N:
Save cache version N+1:
Delete cache version N:
The relevant bit from my workflow
.yml
file:Do I need an auth token with more privileges than the default?