Skip to content

Conversation

@GhadimiR
Copy link
Contributor

@GhadimiR GhadimiR commented May 7, 2025

Description:
To maintain state, this action uses GitHub Actions Cache, via the API. One of the operations it needs to perform in the event of a cache conflict is to delete the existing cache, and this requires the actions: write permission.

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

Copilot AI review requested due to automatic review settings May 7, 2025 14:19
@GhadimiR GhadimiR requested a review from a team as a code owner May 7, 2025 14:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the README to include the required actions: write permission for deleting existing caches via the GitHub Actions Cache API.

  • Adds actions: write under the permissions block in the example workflow.

@ericLemanissier
Copy link

Alternatively, #1237 could be considered, avoiding unnecessary priviledge elevation

@GhadimiR
Copy link
Contributor Author

GhadimiR commented May 7, 2025

Thanks for weighing in @ericLemanissier, I've had a look over your PR and while I agree that there's some merit to the idea of using unique cache keys to just generate new caches instead of resolving a conflict, that isn't the kind of thing we'd do lightly. Would prefer to make this small change to fix the docs and consider something like that for a future major release.

@HarithaVattikuti HarithaVattikuti merged commit f78de97 into actions:main May 8, 2025
3 checks passed
greenrobot-team added a commit to objectbox/objectbox-dart that referenced this pull request Sep 9, 2025
As described in actions/stale#1248 to allow
stale to delete a conflicting cache.
jayudey-wf pushed a commit to jayudey-wf/stale that referenced this pull request Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants