voyagermesh / voyager

🚀 Secure L7/L4 (HAProxy) Ingress Controller for Kubernetes
https://voyagermesh.com
Apache License 2.0
1.35k stars 134 forks source link

Skip running preview-website workflow in forks with credentials #1617

Open jsoref opened 2 years ago

jsoref commented 2 years ago

The https://github.com/voyagermesh/voyager/blob/master/.github/workflows/preview-website.yml workflow absolutely requires credentials that forks will not have:

https://github.com/voyagermesh/voyager/blob/6536e3056d62879342f2f8ee3989b920d215a74f/.github/workflows/preview-website.yml#L45-L53

If you're interested in letting it run in forks, then the first step should check for the presence of the required secrets, and if the they're missing, stop. This can be done with a step that sets an output, either setting an output for a job and then having the core job need that job and condition itself on the output, or by having each subsequent step if to the output.

I can provide a PR to implement either of the above.