If you want to make your repository open source, but keep the workflows private, you can do the following:
- Create a separate repository for your workflows and make it private.
- In the open source repository, include only the necessary configuration files (e.g.
.github/actions) and reference the private repository as a submodule.
- In the private repository, configure the GitHub Actions workflows as you normally would.
- When someone clones or forks the open source repository, the submodule reference to the private repository will not be included.
This way, you can keep your workflows private, while still making your repository open source.