GitHub Actions protection rules sample gates
MIT License
This project implements two GitHub Actions protection rules gates that can be used to gate the execution of a deployment to an environment using GitHub Actions. The gate will approve or reject the deployment based on the rules configured for the gate.
Two gates are provided as samples:
I've create this sample with a few objectives in mind:
And also because I wanted to test GitHub Copilot X in a real world scenario.
I don't provide any hosting for this project so it needs to be self hosted in order to be used.
The project is implemented as .Net Core 6 Azure Functions and can be hosted on Azure Functions or any other hosting provider that supports .Net Core 6 Azure Functions but it requires an Azure Service Bus instance.
Optionally it can use Azure Application Insights for monitoring and logging.
The samples are provided with Bicep files (infrastructure as code) that provisions all the requirements and a setup script that can configure everything for you. The setup script is not required, you can manually configure everything if you prefer.
GitHub Actions that can deploy the gates to Azure are also provided.
See the installation guide for instructions on how to install and configure the provided gates.
See the configuration guide for instructions on how to configure the gates.
If you'd like to contribute to this project, please fork the repository and submit a pull request. We welcome contributions of all kinds, including bug fixes, feature requests, and documentation improvements.
The code should have appropriate unit tests. The tests are run as part of the CI pipeline and must pass before a pull request can be merged.
Code with warnings are now allowed. The CI pipeline will fail if the code has warnings.
In the logos folder you'll find a few logos that may be used in your GitHub Apps.
They have been generated using Open's AI DALL-E and cannot be used for commercial purposes.
This project is licensed under the MIT License - Copyright (c) 2023 Tiago Pascoal
The code uses a very small portion of code derived from Octokit.net.extensions which is licensed under the MIT License - Copyright (c) 2018 Ehsan Mirsaeedi
Besides using Octokit.Net as a dependency, the project also copied some files as well (with some changes) to facilitate Unit testing. Octokit.Net is licensed under the MIT License - Copyright (c) 2023 GitHub, Inc.
The derivations are clearkly marked as such in the source code.