github-workflows-dojo360-scala-ci
Build, test, and scan Scala (SBT) apps using the recommended UHG reusable CI workflow, with optional publish and container builds
Scala CI Workflow Skill
Overview
This skill covers Scala + SBT CI patterns for build/test/scans, optional publish, and optional container builds.
The Dojo360 workflow (scala-sbt-ci.yml) exists, but for new implementations the recommended approach is to use the UHG CI Workflows reusable workflow from uhg-pipelines/ci-workflows.
Workflow Reference
Recommended (Use This)
Repository: uhg-pipelines/ci-workflows
Workflow: .github/workflows/scala-sbt-ci.yml@v2
Legacy (Dojo360)
Repository: dojo360/pipelines-workflows
Workflow: .github/workflows/scala-sbt-ci.yml
Docs: https://github.com/dojo360/pipelines-workflows/tree/main/web/scala-sbt-ci/index.md
Key Features
- Runs SBT build + unit tests
- Artifactory integration via
jfrog-project-key - Optional SBT publish (workflow/input dependent)
- Optional Docker build/publish if you pass Docker inputs
Prerequisites
- Scala/SBT project in the repo (for example:
build.sbtandproject/) - Artifactory project/repositories provisioned
- If building containers:
- Dockerfile must use Optum golden images (no public base images)
- Runner must have Docker available
Common Inputs (UHG reusable workflow)
| Input | Type | Description |
|---|---|---|
jfrog-project-key | string | JFrog project key (routes to correct SaaS Artifactory repos) |
working-directory | string | Where your SBT project lives (default: .) |
java-version | string | Java version for the build (example: 11 or 17) |
java-distribution | string | Java distribution (example: temurin) |
sbt-build-jvm-args | string | JVM args for SBT build (example: -Xmx2g -XX:+UseG1GC) |
sbt-build-command | string | SBT build command (example: clean test or clean test stage) |
sbt-publish-command | string | SBT publish command (example: publish) |
publish-version | string | Version used for publishing artifacts (if publish is enabled) |
docker-tags | string | Image tag(s) to publish when doing Docker builds |
docker-context | string | Docker build context |
docker-dockerfile | string | Dockerfile path |
Secrets
UHG reusable workflows typically handle Artifactory auth via OIDC + EPL actions, but you may still need:
- Repo/org secrets required by your org’s scanning configuration
- Any publish- or deploy-time secrets required by your platform
Templates
See ready-to-copy examples in .github/skills/github-workflows-dojo360-scala-ci/templates/:
basic-scala-sbt-ci.ymlscala-sbt-ci-with-version-tag.ymlscala-sbt-ci-with-docker-build.yml
Notes / Gotchas
- Use a pinned Java version and distribution for reproducibility.
- If you build container images, ensure your Dockerfile uses Optum golden images (see
.github/instructions/docker.instructions.md).
Related Assets
github-workflows-dojo360-azure-infrastructure
Deploy Azure infrastructure using Terraform with PCAM vaulted access and native Azure authentication through Dojo360 Azure Infrastructure workflow
Owner: pcorazao
github-workflows-dojo360-container-cd
Deploy containerized applications to AWS ECS/Azure ACS using Dojo360 Container CD workflow with blue-green and rolling update strategies
Owner: pcorazao
github-workflows-dojo360-container-promotion
Multi-environment container deployment promotion through prescribed deployment paths with automated approval gates and E2E testing
Owner: pcorazao
github-workflows-dojo360-database
Automate database schema updates using Liquibase via the Dojo360 database workflow (with rollback and validation patterns)
Owner: pcorazao
github-workflows-dojo360-database-promotion
Promote Liquibase database changes across environments (dev→qa→cert→prod) with deployment-path validation and approval gates
Owner: pcorazao
github-workflows-dojo360-dockerfile-ci
Build and scan container images from a Dockerfile using Optum golden images and the recommended UHG reusable workflow
Owner: pcorazao

