How To Keep Your Github Actions Workflows Private in an Open Source Repository
If you want to make your repository open source, but keep the workflows private, you can do the following:
1. Create a separate repository for your workflows and make it private.
2. In the open source repository, include only the necessary configuration files (e.g. **`.github/actions`**) and reference the private repository as a submodule.
3. In the private repository, configure the GitHub Actions workflows as you normally would.
4. 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.
Nick Ciolpan
03 Feb 2023
« Back to post