GitHub Actions Workflows
This directory contains template GitHub Actions workflows for CI/CD.
Setup Instructions
For Standalone Repository
Copy the workflow files to .github/workflows/ in your repository root:
mkdir -p .github/workflows
cp .github-template/workflows/* .github/workflows/
For Monorepo
- Copy the workflow files to your monorepo's
.github/workflows/directory - Update the path filters in each workflow file to match your app location
- Update the
working-directoryandcontextpaths as indicated in the comments
Example for an app at apps/my-grpc-service/:
# Add path filters
on:
push:
paths:
- 'apps/my-grpc-service/**'
# Update working directory for Go commands
- name: Run tests
run: go test -v ./...
working-directory: ./apps/my-grpc-service
# Update Docker context
- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: ./apps/my-grpc-service
Workflows Included
ci.yml
- Runs on push/PR to main/develop branches
- Tests, linting, building, and coverage reporting
- Supports Go 1.23
- Uses buf for protobuf generation
docker.yml
- Builds and pushes Docker images
- Multi-platform builds (amd64/arm64)
- Pushes to GitHub Container Registry
- Triggered on pushes to main and tags
Required Secrets
No additional secrets are required - workflows use:
GITHUB_TOKEN(automatically provided)- GitHub Container Registry (ghcr.io)
Customization
- Adjust Go version in ci.yml
- Change registry in docker.yml (e.g., Docker Hub, AWS ECR)
- Add deployment jobs for your platform
- Add security scanning steps