For the Portuguese Version of this README, click here.
This project offers a solution to automate the creation and management of environment configurations on GitHub, including environment variables and secrets. Based on a JSON configuration file (config.json), the system automatically creates and updates the necessary configurations in GitHub repositories.
The need to automate environment configuration on GitHub arises from the limitation of personal accounts in setting global variables and secrets for pipeline workflows. GitHub allows only GitHub Organizations to configure such global variables, and even then, only for public repositories, for private ones only on paid plans. This creates a significant obstacle for developers and teams who want to set up private repositories with automated pipelines.
Without an automated solution, users are required to manually configure variables and secrets for each individual repository, which can be cumbersome and error-prone, especially in environments with many repositories.
This project aims to fill this gap by providing a tool that automates the creation and management of environment configurations on GitHub, allowing users to easily configure variables and secrets across multiple repositories consistently and efficiently.
The application reads the config.json file at the root of the project and uses its information to configure environment variables and secrets in GitHub repositories. The config.json file follows a specific format to define servers, global configurations, and per-repository and per-environment configurations.
The config.json follows the structure below:
{
"servers": { ... },
"configs": { ... },
"repositories": { ... }
}- servers: Defines server configurations.
- configs: Defines global configurations.
- repositories: Defines per-repository configurations.
For more details on the config.json structure, refer to the example file provided in the project (config.example.json).
The table below lists the implemented and in-development features:
| Feature | Status |
|---|---|
| Automatic creation of environments on GitHub | ✔️ |
| Creation of environment variables | ✔️ |
| Creation of secrets | ✔️ |
| Update configuration values | ✔️ |
| Configuration versioning | 🚧 |
| Detection and application of changes | 🚧 |
| More functionalities to be defined | 🚧 |
To use this application, follow these steps:
-
Clone este repositório para o seu ambiente local.
-
Certifique-se de ter o Node.js instalado.
-
Instale as dependências do projeto
-
Adicione as configurações de variáveis de ambiente.
-
Edite o arquivo
config.jsonconforme necessário. -
Execute o script de execução da aplicação.
-
Verifique os repositórios no GitHub para confirmar as configurações.
-
Clone this repository to your local environment.
-
Make sure you have Node.js installed.
-
Install the project dependencies.
-
Add the environment variable configurations.
-
Edit the
config.jsonfile as needed. -
Run the application execution script.
-
Check the repositories on GitHub to confirm the configurations.
To install the project dependencies, use the following command:
npm install
# Or if you prefer:
yarn installTo run the application, use the following command:
npm start
# Or if you prefer:
yarn startContributions are welcome! If you want to contribute to this project, follow these steps:
- Fork this repository.
- Create a new branch for your feature (
git checkout -b feature/nova-feature). - Commit your changes (
git commit -am 'Adiciona nova feature'). - Push to the branch (
git push origin feature/nova-feature). - Open a Pull Request.
- Lucas Gulart - Lead Developer
This project is licensed under the MIT License - see the LICENSE file for details.