Skip to content

chore: Prevent Github action from running on forks - #1343

Merged
gcf-merge-on-green[bot] merged 1 commit into
masterfrom
dont-run-github-action-on-forks
May 7, 2021
Merged

chore: Prevent Github action from running on forks#1343
gcf-merge-on-green[bot] merged 1 commit into
masterfrom
dont-run-github-action-on-forks

Conversation

@parthea

@parthea parthea commented May 7, 2021

Copy link
Copy Markdown
Contributor

Fixes #1342 🦕

@parthea
parthea requested a review from a team May 7, 2021 14:32
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label May 7, 2021
@parthea parthea added the automerge Merge the pull request once unit tests and other checks pass. label May 7, 2021
@gcf-merge-on-green
gcf-merge-on-green Bot merged commit 76cf688 into master May 7, 2021
@gcf-merge-on-green
gcf-merge-on-green Bot deleted the dont-run-github-action-on-forks branch May 7, 2021 16:08
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label May 7, 2021
gcf-merge-on-green Bot pushed a commit that referenced this pull request May 10, 2021
PR #1343 was supposed to fix #1342 but the issue still persists. See [this](https://github.com/parthea/google-api-python-client/actions/runs/824759723) github action from my fork.

The root cause turned out to be the multiline format of the `if` statement of `main.yml`. I expected the pipe `|` character to allow `if` statements to be used in a multiline format however the actual behaviour is different than I expected. This PR converts the check to a single line `if` statement.

Using the fix in this PR the workflow was correctly skipped in parthea/pull/1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Github action seems to be running on forks

3 participants