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

Do not error out when no credentials are provided #33

Merged
merged 2 commits into from
Feb 28, 2020
Merged

Do not error out when no credentials are provided #33

merged 2 commits into from
Feb 28, 2020

Conversation

tiangolo
Copy link
Contributor

Right now, if Netlify credentials are not provided, this action terminates with an error.

But GitHub currently doesn't provide secrets (with Netlify credentials) to GitHub actions triggered by PRs from forks. They are only provided to actions triggered by PRs from branches on the same repo.

This means that if someone sends a PR with changes from a fork, it's currently not possible to deploy a preview (it's currently just not supported by GitHub), and this action will always report an error in those cases.

The change in this PR makes the action just not run in that case, not deploying, instead of exiting with an error. And that way it lets the rest of the CI run.

@nwtgck
Copy link
Owner

nwtgck commented Feb 28, 2020

@tiangolo Thank you very much for your PR! I'll merge this.


This PR related to

@nwtgck nwtgck merged commit 7098c8f into nwtgck:develop Feb 28, 2020
@tiangolo tiangolo deleted the no-auth-no-error branch February 28, 2020 16:19
@tiangolo
Copy link
Contributor Author

Great, thank you! 🎉

@nwtgck
Copy link
Owner

nwtgck commented Mar 6, 2020

@tiangolo Hi!

I'd like to make an announcement for you, which might be helpful and related to this issue.

I made a GitHub Actions to preview pull-request of forked repo.
GitHub Actions: https://github.com/nwtgck/actions-merge-preview

actions-merge-preview

Here is an actual pull request from non-maintainers:
nwtgck/piping-chat-web#194

@nwtgck
Copy link
Owner

nwtgck commented Mar 9, 2020

@tiangolo Hi, I made another more general GitHub Actions than the previous comment. You will get preview-branch to run GitHub Actions with secrets for forked repos.

image

Learn more: https://github.com/nwtgck/actions-comment-run/tree/20297f070391450752be7ac1ebd454fb53f62795#pr-merge-preview

@tiangolo
Copy link
Contributor Author

tiangolo commented Apr 6, 2020

Thanks!

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