Shared reusable workflows for all Sysopoly service repositories.
Builds a Docker container image and pushes it to GitHub Container Registry (GHCR).
Features:
- Multi-stage Docker build with Buildx
- GitHub Actions cache for faster builds
- Automatic tagging:
latest(default branch), git SHA, branch name - Optional Go test step before building
- Uses built-in
GITHUB_TOKEN— no additional secrets needed
Usage:
Create .github/workflows/deploy.yml in your service repo:
name: Build and Deploy
on:
push:
branches: [main, master]
workflow_dispatch:
jobs:
build:
uses: Sysopoly/github-actions/.github/workflows/build-and-push.yml@master
with:
image-name: my-service-name
permissions:
contents: read
packages: writeInputs:
| Input | Required | Default | Description |
|---|---|---|---|
image-name |
Yes | — | Image name (pushed as ghcr.io/sysopoly/<image-name>) |
dockerfile |
No | ./Dockerfile |
Path to Dockerfile |
context |
No | . |
Docker build context |
run-tests |
No | false |
Run go test before building |
go-version |
No | 1.25 |
Go version for tests |
Images are automatically pulled by Podman's AutoUpdate=registry mechanism on the VPS.
The systemd timer podman-auto-update.timer checks for new images periodically.
No webhook or manual deployment step is needed.
| Service | Image Name | Branch |
|---|---|---|
| sethabit-api | sethabit-api |
main |
| sysopoly-auth-service | sysopoly-auth-service |
master |
| sethabit-logs | sethabit-logs |
main |
| sethabit-scheduler | sethabit-scheduler |
main |
| sysopoly-notifications-service | sysopoly-notifications-service |
master |
| sysopoly-media-service | sysopoly-media-service |
master |
| sysopoly-infrastructure-mcp | sysopoly-infrastructure-mcp |
master |