-
I want to setup a workflow that only runs on PR’s (so that my PR’s are triggered and also PR’s from people who forked my repository). The workflow does:
I want to make sure, that step **3.** only happens on the PR’s I create myself, but never on PR’s that come from forks. Is there a way to figure out (e.g.: via |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Yea, you won’t be able to use secrets in Actions run from forks. So if you use secrets to publish this image, it won’t succeed for forks anyway. |
Beta Was this translation helpful? Give feedback.
-
I want to explicitly NOT run any steps that require secrets on forked PR’s via some kind of condition. |
Beta Was this translation helpful? Give feedback.
-
You can try something like this. Reference: https://developer.github.com/v3/activity/events/types/#pullrequestevent |
Beta Was this translation helpful? Give feedback.
-
I tried exactly this, but it doesn’t work. I’ve defined it here as suggested: https://github.com/cytopia/docker-ansible/blob/release-0.16-1/.github/workflows/linting.yml#L39 Then I’ve created a pull request from a forker account to verify this. The build step runs regardless: And |
Beta Was this translation helpful? Give feedback.
-
I misunderstood you a bit, try this one. |
Beta Was this translation helpful? Give feedback.
-
Thanks, this works as expected |
Beta Was this translation helpful? Give feedback.
I misunderstood you a bit, try this one.