Repository Settings
Set secrets at the environment, repository or organization level
Reference the secret in the workflow YAML file:
Protect the ‘main’ and ‘Release’ branches
Further Reading: About protected branches
Optionally, configure Environment protection rules
Optionally, protect tags
This prevents developers from creating and pushing their own tags.
GitHub Actions - CI/CD Pipeline
Each CI/CD pipeline is defined as a workflow with a corresponding YAML file in the (standard) .github/workflows
folder:
The three workflow files aboce are essentially identical. They only differ in the type of trigger used and the target environment.
Development Trigger
on:
pull_request:
branches:
- 'Release/*'
UAT/Staging Trigger
on:
push:
branches:
- 'Release/*'
Production Trigger - Schedule
on:
schedule:
- cron: '0/10 * * * *'
Production Trigger - Push
on:
push:
branches:
- 'main'
Full Example
View previous workflow runs on the “Actions” tab
Environments
Access active environments from the project landing page:
The full deployment history for all environments:
Detail view for a particular deployment: