The GitHub Actions Workflows in this repository enable a CI pattern for managing service releases.
- Any push to an active branch should trigger linting, typing, and testing jobs.
- Any active "ticket" branch should trigger an OCI image build and push, so the work may be deployed to a dev or staging environment.
- Any PR merged to
main
should trigger a "release", which should include bumping the project version and writing a Git tag. - Any new tags pushed to the repo should trigger an OCI image build and push, so the work may be deployed to a production environment.
flowchart LR
A[GitHub Actions Event]
B{Tag or Branch?}
BM{Merged PR?}
BP([Build+Push])
C[Lint+Type+Test]
Release[Release]
Ver([Bump Version])
Tag([Write Tag])
A -->|Push/Tag/PR| B
B -->|Branch/PR| BM
B -->|Tag| BP
BM -->|No| C
BM -->|Yes| Release
Release --> Ver
Ver --> Tag
Tag -->|workflow_dispatch| A
C -->|ticket?| BP
Github Events are not generated by actions initiated using a GITHUB_TOKEN
, e.g., a workflow that pushes to the repo does not itself cause a push
event.
For this reason, the build_and_push
workflow is explicitly triggered by the release
workflow using a workflow_dispatch
action.