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

fix: try on: pull_request_target to share secrets with fork instead of on: pull_request #7

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

anitarua
Copy link
Collaborator

@anitarua anitarua commented Jan 8, 2025

on: pull_request_target allows the sharing of secrets with forks, and it should be used with a safeguard, such as checking the permissions of the triggering actor, as we do here.

on: pull_request will not share secrets with forks, even if triggering actor has write permissions, as seen with this PR: #6

Also did some minor cleanup of the workflow file:

  • Determined that the default ref used by checkout action is fine, removed the second block with non-default ref
  • Use if condition in github actions syntax to avoid printing out the secret when checking if it exists

@anitarua anitarua merged commit 34184e7 into main Jan 8, 2025
@anitarua anitarua deleted the try-pull-request-target branch January 8, 2025 19:08
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.

2 participants