Project-specific and branch-specific overrides for the release-train-build and release-train-test composite actions deployed to commercial repositories.
When the workflow generator runs for a commercial repository branch, the generate-workflows-for-branch action copies one of the following sources into the target repo as .github/actions/release-train-build/action.yml and .github/actions/release-train-test/action.yml:
| Priority | Source (in spring-cloud-github-actions) |
|---|---|
| 1 (branch-specific) | config/release-train-actions/<project>/<branch>/<action>/action.yml |
| 2 (project-level) | config/release-train-actions/<project>/<action>/action.yml |
| 3 (global default) | .github/actions/<action>/action.yml |
<project> is the OSS project name — strip spring-cloud/ and -commercial from the full repo name.
<branch> is the exact branch name (e.g. release/5.0.2.1). Since branch names can contain /, they map to nested directories.
<action> is either release-train-build or release-train-test.
In addition, .github/actions/release-train-settings.xml is copied to the root of the commercial repo as release-train-settings.xml so that Maven commands can reference --settings release-train-settings.xml without an absolute path.
config/release-train-actions/
<project>/ ← project-level overrides
release-train-build/
action.yml
release-train-test/
action.yml
<branch>/ ← branch-specific overrides (nested for branch names with /)
release-train-build/
action.yml
release-train-test/
action.yml
config/release-train-actions/
spring-cloud-kubernetes/
release-train-build/
action.yml ← used for all branches (adds MAVEN_OPTS to skip image builds)
-
Create
config/release-train-actions/<project>/release-train-build/action.yml(and/orrelease-train-test). -
Write a standard composite action. The action will be copied verbatim into the target repo, so you can reference
release-train-settings.xmlfrom the repo root (it is always present).name: Build Release runs: using: composite steps: - name: Build Release shell: bash env: MAVEN_OPTS: "-Dskip.build.image=true" run: ./mvnw --batch-mode --settings release-train-settings.xml clean deploy \ --activate-profiles releaseTrain \ -DaltDeploymentRepository="release-train::default::file://$(pwd)/deployment-repository" \ -DskipTests
-
Run Run GitHub Actions Workflow Generator (optionally scoped to the affected project) to deploy the override.
-
Create the nested directory corresponding to the branch name:
config/release-train-actions/spring-cloud-foo/release/5.0.2.1/release-train-build/action.yml -
Follow the same format as a project-level override.
-
Re-run the generator for that branch.
The global defaults live at:
.github/actions/release-train-build/action.yml.github/actions/release-train-test/action.yml
These are used for any project/branch that does not have a matching override in this directory. Edit those files to change the default build/test behaviour for all projects.