The GitHub Actions workflows have been updated to automatically build and push container images to Quay.io on every push to the main branch and during releases.
.github/workflows/build-artifacts.ymlAdded new job: build-and-push-container
main branch (not on PRs)quay.io/sshaaf/keycloak-mcp-server:<git-sha> (e.g., 49ff54e)quay.io/sshaaf/keycloak-mcp-server:latestFeatures:
.github/workflows/release.ymlAdded new job: build-and-push-container
quay.io/sshaaf/keycloak-mcp-server:<git-sha> (e.g., 49ff54e)quay.io/sshaaf/keycloak-mcp-server:<version> (e.g., 0.3.0)quay.io/sshaaf/keycloak-mcp-server:latestFeatures:
pom.xml (no hardcoded versions!)Version Management:
The workflow automatically extracts the version from pom.xml using Maven:
mvn help:evaluate -Dexpression=project.version -q -DforceStdout
This ensures the GitHub Actions version always matches your Maven project version - no manual updates needed!
github-actions-setup.mdComprehensive guide covering:
QUAY_USERNAME, QUAY_PASSWORD)README.mdYou must configure these secrets in your GitHub repository:
QUAY_USERNAME: Your Quay.io username or robot accountQUAY_PASSWORD: Your Quay.io password or robot tokenHow to add secrets:
QUAY_USERNAME and QUAY_PASSWORDRecommended: Use a Quay.io robot account for better security:
sshaaf+github_actions)# Developer pushes to main
git commit -m "Add new feature"
git push origin main
# GitHub Actions automatically:
# 1. Builds JAR and native binaries
# 2. Builds container image with Jib
# 3. Tags with git commit SHA + latest
# 4. Pushes to quay.io/sshaaf/keycloak-mcp-server
# Result:
# - quay.io/sshaaf/keycloak-mcp-server:49ff54e
# - quay.io/sshaaf/keycloak-mcp-server:latest
# Developer creates PR
git push origin feature-branch
# GitHub Actions:
# 1. Builds JAR and native binaries
# 2. Does NOT push container image
#
# Why? Saves resources and prevents cluttering the registry
# Maintainer triggers release workflow
# GitHub Actions:
# 1. Builds JAR and native binaries
# 2. Builds container image with Jib
# 3. Tags with git SHA + version + latest
# 4. Pushes to Quay.io
# 5. Creates GitHub release
# Result:
# - quay.io/sshaaf/keycloak-mcp-server:49ff54e
# - quay.io/sshaaf/keycloak-mcp-server:0.3.0
# - quay.io/sshaaf/keycloak-mcp-server:latest
| Event | Git SHA Tag | Version Tag | Latest Tag |
|---|---|---|---|
| Push to main | Yes | No | Yes |
| Pull Request | No build | No build | No build |
| Release | Yes | Yes | Yes |
docker pull quay.io/sshaaf/keycloak-mcp-server:latest
docker pull quay.io/sshaaf/keycloak-mcp-server:49ff54e
docker pull quay.io/sshaaf/keycloak-mcp-server:0.3.0
docker run -d \
-p 8080:8080 \
-e KC_URL=http://host.docker.internal:8180 \
-e KC_USER=admin \
-e KC_PASSWORD=admin \
--name keycloak-mcp \
quay.io/sshaaf/keycloak-mcp-server:latest
Go to: https://github.com/sshaaf/keycloak-mcp-server/actions
Look for the “Build and Push” workflow and check the summary.
Go to: https://quay.io/repository/sshaaf/keycloak-mcp-server?tab=tags
You should see:
latest tag49ff54e)0.3.0) for releases# Pull the image
docker pull quay.io/sshaaf/keycloak-mcp-server:latest
# Check image labels
docker inspect quay.io/sshaaf/keycloak-mcp-server:latest | grep -A5 Labels
# Run it
docker run --rm quay.io/sshaaf/keycloak-mcp-server:latest
Check:
Solution: See github-actions-setup.md
Check:
main branch?Check:
fetch-depth: 0 in checkoutQUAY_USERNAME and QUAY_PASSWORDmain and watch the workflowAutomatic Builds: Every push to main builds and pushes images
Git SHA Tagging: Perfect traceability with commit SHAs
Release Versioning: Semantic versions on releases
Multi-Architecture: AMD64 and ARM64 support
No Docker Required: Jib handles everything
Secure: Robot accounts and GitHub Secrets
Your CI/CD pipeline is now fully automated!
Next push to main will automatically build and publish your container images to Quay.io.