Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix cleanup example to use pull_request_target trigger #1312

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Mogyuchi
Copy link

Description

Change the workflow trigger event from pull_request to pull_request_target in the "cleanup caches by a branch" workflow example.

Motivation and Context

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.
This problem can be avoided by using the pull_request_target event.

How Has This Been Tested?

I've updated the workflow to use the pull_request_target event and triggered a GitHub Actions run.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (add or update README or docs)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Signed-off-by: Mogyuchi <mogyuchi@mogyuchi.jp>
@Mogyuchi Mogyuchi requested a review from a team as a code owner January 28, 2024 15:54
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.

1 participant