Skip to content

Why can't Github Actions workflows access secrets when triggered by a pull_request event? #49

Discussion options

You must be logged in to vote

You run your workflow in the context of a pull_request event. They are executed in an untrusted mode because a PR branch may have malicious code added by a submitter. Therefore, GitHub does not allow access to secrets for such events: https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets#using-encrypted-secrets-in-a-workflow

If you'll use the push event, as shown in the guide, it will work as long as the event happens within the upstream repo (not in forks).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@lennart-damen
Comment options

Answer selected by webknjaz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #49 on December 07, 2020 22:57.