Reusable GitHub Actions workflows for PurgeBot-net. All service and library repos call these via workflow_call.
Builds and pushes a Docker image to ghcr.io tagged with both latest and the commit SHA. Called on every push to main, pull request, and manual dispatch for service repos — on pull requests the Docker login/build/push steps are skipped, so only vet and tests run.
| Input | Description |
|---|---|
package_name |
Repository / image name (e.g. gateway) |
Runs vet and tests for library repos (no Docker image produced).
Labels pull requests based on the checked checkboxes in the PR body (type:bug, type:feature, etc.), adds needs:bump_common / needs:bump_database / needs:bump_locale when the PR body references a pull request in those repos, and flags uncommented local replace directives (=> ../…) in go.mod.
Validates docker-compose.yml syntax and checks that every bare ${VAR} reference in the compose file has a corresponding entry in .env.example (references with an inline default, e.g. ${VAR:-default}, are skipped).
Reference a workflow from your repo's CI:
jobs:
build:
uses: PurgeBot-net/workflows/.github/workflows/build-service.yml@main
with:
package_name: my-service
secrets: inheritNew repos should be created from the template, which wires this up automatically.