Shared GitHub Actions workflows and composite actions for Spring Cloud projects. This repository provides reusable automation for building, testing, and deploying Spring Cloud repositories with consistent branch and JDK version handling.
- Workflows — Reusable workflows callable from other repositories
- Actions — Composite actions used by those workflows (and optionally by callers)
- Config — Centralized configuration (e.g. branches and JDK versions per project)
- Examples — Example caller workflows you can copy into your project
| Workflow | Description | Documentation |
|---|---|---|
| deploy.yml | Build and deploy Spring Cloud projects with matrix builds (branch × JDK). Uses centralized config to decide what to build and deploy. | README |
| pr.yml | Reusable build workflow called during pull requests. Accepts a custom build command and Artifactory/Dockerhub secrets. | — |
| initialize-commercial-branch.yml | Full-control workflow that creates a new commercial branch from an OSS branch and runs all commercial setup steps (settings, CI/PR workflows, licenses, repositories, distribution management, Antora playbook, projects.json). | Example |
| create-commercial-branch.yml | Simplified wrapper over initialize-commercial-branch for the common case: copies an OSS branch to <repo>-commercial using the same branch name. |
— |
| create-hotfix-branch.yml | Creates a commercial hotfix branch from an OSS tag, applies all commercial setup steps, and stamps the project version to a hotfix snapshot. | README |
| retire-branch.yml | Retires a branch: removes it from projects.json, removes its Dependabot entries, and locks the branch via the GitHub API. |
README |
| Action | Description | Documentation |
|---|---|---|
| determine-matrix | Reads config/projects.json and produces a build matrix (branches × JDK versions) for the current repo and event. Supports OSS/commercial, scheduled vs single-branch, and comma-separated branch overrides. | README |
| create-commercial-branch | Copies the content of an OSS branch into a new orphan branch in a commercial repository, with no OSS git history. Optionally sets the new branch as the repo default. | README |
| copy-dependabot-config | Copies dependabot.yml / dependabot.yaml from one branch to another within the same repository as a separate commit. |
README |
| copy-settings-xml | Replaces .settings.xml on a target branch with the version from the source (or default) branch. |
README |
| update-oss-workflows-to-commercial | Updates ci and pr workflow files on a commercial branch: restricts branches, adds runs_on, and injects Artifactory secrets. |
README |
| update-license-headers | Replaces Apache License 2.0 headers with the Broadcom license header across all source files, and replaces LICENSE / LICENSE.txt with the Broadcom license file. |
README |
| update-commercial-repositories | Replaces repo.spring.io OSS repository references with commercial Broadcom Artifactory repositories in all Maven POM and Gradle build files. |
README |
| update-distribution-management | Replaces OSS <distributionManagement> targets with commercial Broadcom Artifactory repositories and removes Maven Central publishing plugin references. |
README |
| update-antora-playbook | Registers a new commercial branch in the Antora playbook on the docs-build branch, expanding tag patterns as needed. |
README |
| update-projects-json | Updates config/projects.json when a new commercial branch is initialized: adds the branch to scheduled, copies JDK versions from the OSS entry, and optionally updates the default branch. |
README |
| retire-branch-projects-json | Updates config/projects.json when a branch is retired: removes it from scheduled and jdkVersions. Fails fast if the branch is still set as the default. |
README |
| trigger-branch-ci | Dispatches the ci.yml or ci.yaml workflow for each non-default branch in a Spring Cloud project. |
README |
| set-commercial-creds-env-vars | Sets COMMERCIAL_ARTIFACTORY_USERNAME/PASSWORD environment variables, falling back to read-only credentials during PR builds. |
README |
- config/projects.json — Defines, per project, which branches to build (e.g. for scheduled runs) and which JDK versions to use per branch. Includes separate
ossandcommercialsections and adefaultsfallback. The determine-matrix action reads this file to build the matrix used by the deploy workflow.
- In your Spring Cloud project, add a workflow that calls the deploy workflow (see examples/deploy.yml).
- Configure the required secrets in your repository (
ARTIFACTORY_*,DOCKERHUB_*; addCOMMERCIAL_*for commercial repos). - Trigger via push, schedule, and/or
workflow_dispatch. The deploy workflow will use this repo's config and actions to decide what to build and deploy.
For full details on inputs, secrets, and behavior, see the Deploy workflow README and the Determine Matrix action README.