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

Trigger CI off pull_request_target so workflow runs in the context of the base branch #970

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

emmyoop
Copy link
Member

@emmyoop emmyoop commented Dec 6, 2024

resolves #971

Problem

PRs from forks will fail CI because the PR trigger is pull_request so they do not have access to teh repo vars that are needed since the workflow runs in the context of the fork.

Solution

Update to trigger off pull_request_target and the workflow runs in the context of the base branch (this repo).

Does not require a release since it only affect local CI

Checklist

  • This code is associated with an issue which has been triaged and accepted for development.
  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the README.md (if applicable)

@emmyoop emmyoop requested a review from dbeatty10 December 6, 2024 16:20
Copy link
Contributor

@dbeatty10 dbeatty10 left a comment

Choose a reason for hiding this comment

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

Thank you @emmyoop ! 🚀

@dbeatty10 dbeatty10 added this pull request to the merge queue Dec 6, 2024
Merged via the queue into main with commit 5c9dc0d Dec 6, 2024
4 checks passed
@dbeatty10 dbeatty10 changed the title Use pull_request_target trigger Trigger CI off pull_request_target so workflow runs in the context of the base branch Dec 6, 2024
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.

Use pull_request_target trigger for CI
2 participants