This document describes the release process for Tron, including building Docker images, creating releases, and updating the Helm chart.
The release process is automated using GitHub Actions workflows:
- Build and Push - Automatically builds and pushes Docker images on every push
- Release - Creates GitHub releases when tags are pushed
- Helm Chart Update - Updates the Helm chart repository with new versions
- API:
ghcr.io/grid-labs-tech/tron-api - Portal:
ghcr.io/grid-labs-tech/tron-portal
Images are tagged with:
latest- Latest build from main branchv1.0.0- Semantic version tagsmain-<sha>- Branch builds with commit SHApr-<number>- Pull request builds
Update the version in relevant files if needed:
api/app/main.py- FastAPI app versionportal/package.json- Package version
# Create an annotated tag (starting with v0.1.0)
git tag -a v0.1.0 -m "Release version 0.1.0"
# Push the tag
git push origin v0.1.0When you push a tag matching v*.*.* (e.g., v0.1.0, v0.2.0, v1.0.0):
- The
release.ymlworkflow triggers - Docker images are built and pushed to GHCR
- A GitHub Release is created
- Release notes are generated
The Helm chart can be updated automatically or manually:
Automatic:
- Configure
update-helm-chart.ymlto trigger on releases - Ensure
GH_PATsecret is configured
Manual:
- Go to Actions → Update Helm Chart
- Click "Run workflow"
- Enter the version number
- The workflow updates the charts repository
Triggers:
- Push to
mainbranch - Push of tags matching
v* - Pull requests to
main
What it does:
- Builds multi-arch Docker images (amd64, arm64)
- Pushes to GitHub Container Registry
- Uses build cache for faster builds
- Tags images appropriately
Triggers:
- Push of tags matching
v*.*.*
What it does:
- Builds production Docker images
- Pushes images with version and
latesttags - Creates GitHub Release with release notes
- Includes installation instructions in release notes
Triggers:
- Manual workflow dispatch
- Published releases (if configured)
What it does:
- Checks out the charts repository
- Updates Chart.yaml version
- Updates values.yaml with new image tags
- Packages the Helm chart
- Commits and pushes changes
Configure these secrets in GitHub repository settings:
GITHUB_TOKEN- Automatically provided by GitHub ActionsGH_PAT- Personal Access Token with write access togrid-labs-tech/chartsrepository
api/Dockerfile.prod- Multi-stage build for APIportal/Dockerfile.prod- Multi-stage build for Portal (React + Nginx)
- Multi-stage builds for smaller images
- Non-root user execution
- Health checks configured
- Optimized layer caching
- Multi-arch support (amd64, arm64)
# Build API image
docker build -f api/Dockerfile.prod -t tron-api:local ./api
# Build Portal image
docker build -f portal/Dockerfile.prod -t tron-portal:local ./portal# Run API
docker run -p 8000:8000 \
-e DB_HOST=host.docker.internal \
-e DB_USER=tron \
-e DB_PASSWORD=tron \
-e DB_NAME=api \
tron-api:local
# Run Portal
docker run -p 3000:80 tron-portal:localWe follow Semantic Versioning:
- MAJOR - Breaking changes (starts at 0 for initial development)
- MINOR - New features (backward compatible)
- PATCH - Bug fixes (backward compatible)
Initial version: v0.1.0
Examples:
v0.1.0- Initial releasev0.1.1- Patch releasev0.2.0- Minor releasev1.0.0- First stable release
- Check GitHub Actions logs
- Verify Dockerfile syntax
- Ensure all dependencies are in requirements.txt/package.json
- Verify tag format matches
v*.*.* - Check workflow permissions
- Review GitHub Actions logs
- Verify
GH_PATsecret is configured - Check charts repository permissions
- Review workflow logs for errors