Skip to content

The workflow named "cleanup caches by a branch" is not working as expected #31321

@Mogyuchi

Description

@Mogyuchi

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows

What part(s) of the article would you like to see updated?

Modify the workflow example in Managing caches > Force deleting cache entries

Why:
When triggered by the pull_request event, the GITHUB_TOKEN does not have permission to delete the cache of the base repository in a cross-repository pull request. This results in the error Error: Resource not accessible by integration.

Additional information

This always happens for cross-repository pull requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    actionsThis issue or pull request should be reviewed by the docs actions teamcontentThis issue or pull request belongs to the Docs Content teamstaleThere is no recent activity on this issue or pull request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions