Using Github Actions for Deployments
Setup Github Actions for Deployment
Action to deploy PRs made against main branch (in my case Development).
Action to deploy to QA, Production, etc. after tests pass in Development.
Setup Rulesets for enforcement or assistance in following processes
Ruleset on Development to Require a PR, and code review.
- Target branches: Development
- Restrict deletions
- Require a pull request before merging
- Require Approvals: 1
- Block force pushes
Ruleset for Deploying Tags
- Target tags: *-Deploy-QA, *=Deploy-PROD
- Restrict updates - we don’t want changes after a deployment. Raise a new tag.
- Restrict deletions - we want to maintain a nice history for audits.
- Block force pushes
Ruleset for Tag Naming (just to avoid typos)
- Target tags excluding: *-Deploy-QA, *-Deploy-PROD
- Restrict creations
- Block force pushes
Setup Environments for Deployments
- PROD, QA environments with Required reviewers: DBA team.
- Allows DBA team to control when changes get deployed.
- Development environment could be setup with Required reviewers: Developers.
- This would serve as a peer review. This is already handled by the PR ruleset, so only choose one.