Skip to content

ci: build with Amazon Corretto instead of adopt - #9

Merged
tblauvvik merged 1 commit into
mainfrom
ci/jdk-corretto
Oct 27, 2026
Merged

tblauvvik merged 1 commit into
mainfrom
ci/jdk-corretto

Conversation

@tblauvvik

Copy link
Copy Markdown
Contributor

Why

actions/setup-java v6 removed the adopt distribution (v6.0.0 release notes: "Remove legacy Adopt distributions in v6", actions/setup-java#1185). The next setup-java bump would fail with No supported distribution was found for input adopt, as it already does in OriginAS/must-booking#9.

We build with Amazon Corretto (distribution: corretto) because prod runs on AWS.
Steps on setup-java v1/v2 move to v3, the lowest version that has Corretto. Steps already on v3+ keep their version.

Part of OriginAS/origin-infrastructure#109.

Changed steps

File Job setup-java distribution java-version
.github/workflows/deploy-craft.yml deploy v4 adopt → corretto ${{ inputs.jdk }}
.github/workflows/deploy-jetty-2.yml deploy v4 adopt → corretto ${{ inputs.jdk }}
.github/workflows/deploy-jetty-hrfi.yml deploy v4 adopt → corretto ${{ inputs.jdk }}
.github/workflows/deploy-spring-boot-hrfi.yml deploy v4 adopt → corretto ${{ inputs.jdk }}
.github/workflows/deploy-spring-boot.yml deploy v4 adopt → corretto ${{ inputs.jdk }}
.github/workflows/maven-build-hrfi.yml build v1 → v3 (none, v1 installs Zulu) → corretto ${{ inputs.jdk }}
.github/workflows/maven-build.yml build v1 → v3 (none, v1 installs Zulu) → corretto ${{ inputs.jdk }}
.github/workflows/maven-release-hrfi.yml build v1 → v3 (none, v1 installs Zulu) → corretto ${{ inputs.jdk }}
.github/workflows/maven-release.yml build v4 adopt → corretto ${{ inputs.jdk }}

No Java version changes in this PR. Nothing else changes either: no other steps, action versions, step names or formatting.

Notes

  • None of these run on this PR: they are reusable workflows and every caller pins @main, so the change reaches all callers on merge. The first caller build/release/deploy after merge is the real test.
  • Action version updates (including setup-java v3/v4/v5 → v6) are left to Dependabot. This PR only changes the JDK distribution and the minimum setup-java version Corretto needs.
  • v1 → v3: both write ~/.m2/settings.xml with server id github and GITHUB_ACTOR/GITHUB_TOKEN by default. Nothing in these jobs writes its own settings.xml before the bumped step (any "Configure Maven" step runs after it), so the result is the same.
  • These are reusable workflows (java-version: ${{ inputs.jdk }}). Corretto only takes major versions, so I checked the jdk: values every caller passes (gh search code --owner OriginAS "origin-actions/.github/workflows/", 57 caller files, all @main):
    • deploy-jetty-hrfi.yml: 11, not passed (default)
    • deploy-spring-boot-hrfi.yml: 11
    • maven-build-hrfi.yml: not passed (default)
    • maven-build.yml: 17, 25, not passed (default)
    • maven-release-hrfi.yml: not passed (default)
    • maven-release.yml: 17, 21
    • No caller passes a dotted version (e.g. 1.8, 11.0.5); the input defaults are 11 or 17. All callers use @main, so this takes effect for all of them on merge.
  • deploy-craft.yml uses ${{ inputs.jdk }} and ${{ inputs.goals }} but declares neither input, and no caller was found. That is pre-existing and unchanged here.

Open PRs touching the same workflow files

None.

🤖 Generated with Claude Code

setup-java v6 removed the adopt distribution, so the next setup-java
bump would fail ("No supported distribution was found for input adopt").
Switch every setup-java step to distribution: corretto, the JDK we run
in prod on AWS. The setup-java v1 steps had no distribution input (v1
installs Zulu); they get distribution: corretto too. Steps on setup-java
v1 move to v3, the lowest version with Corretto; later version bumps are
left to Dependabot.

Part of OriginAS/origin-infrastructure#109.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tblauvvik
tblauvvik merged commit 05e4eb6 into main Oct 27, 2026
@tblauvvik
tblauvvik deleted the ci/jdk-corretto branch October 27, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants