Define different Github environments
- Testing:
test - Staging:
staging- Also set
failas a "Deployment branch" to demonstrate a failed secret
- Also set
- Production:
prod
Secrets are stored per environment
- Testing:
TEST_SECRET - Staging:
STAGING_SECRET - Production:
PROD_SECRET
- Require a pull request before merging to
main - Only allow merge from
staging(right now a manual process)
- Require a pull request before merging to
staging - Also require for admins
- Create new branch
- update, commit, push
- run unit and integration tests
- merge to
staging - merge
stagingtomaster
- if branch is main
- validate secrets exist
- validate infrastructure
- deploy to prod
- if branch is staging
- validate secrets exist
- validate infrastructure
- deploy to staging
- Runs CI on pushes to pattern named branches
- feature
- bugfix
- hotfix
- Runs CD (dev) on merge to main
- Runs CD (prod) on release