Skip to content

docs: fix README and advanced usage inconsistencies with actual behavior - #1204

Merged
brunoborges merged 1 commit into
actions:mainfrom
brunoborges:brunoborges-docs-accuracy-audit
Aug 5, 2026
Merged

brunoborges merged 1 commit into
actions:mainfrom
brunoborges:brunoborges-docs-accuracy-audit

Conversation

@brunoborges

Copy link
Copy Markdown
Contributor

Description:

Several statements in README.md and docs/advanced-usage.md had drifted away from what the action actually does, which is confusing for users trying to figure out what is supported. This audits both documents against action.yml and src/ and corrects the mismatches.

Most of the docs held up: the java-package compatibility table matches JAVA_PACKAGE_CAPABILITIES, the platform/architecture table matches JAVA_PLATFORM_CAPABILITIES (including the armv7 <18 and x86 <12 restrictions), and the checksum-capable distribution list, verify-signature support, SDKMAN/asdf vendor mappings, cache key format, and cache-jdk matrix are all accurate. The changes here are limited to the parts that were not.

Corrected inaccuracies

  • Advanced usage opened with "Inputs java-version and distribution are mandatory", ignoring java-version-file and distribution inference from .sdkmanrc / .tool-versions.
  • The TLS security warning claimed setup-java "does not verify a pinned checksum or signature of the downloaded archive, so TLS is effectively the only integrity guarantee". That is no longer true given automatic checksum verification and verify-signature. Rewritten so the warning (still valid) no longer rests on a false premise, and it now notes that version metadata requests are the unverified link in the chain.
  • The jdkfile toolchain example claimed id: Oracle_1.6. configureToolchains generates ${vendor}_${version}, so it is jdkfile_1.6. README's mvn-toolchain-id default was also corrected from ${distribution}_... to ${vendor}_..., and the vendor/ID relationship is now spelled out.
  • The liberica-nik row said unsupported java-package values "resolve to the standard bundle". validateJavaPackage rejects them.
  • README's latest description said it always resolves from the distribution's own metadata. Distributions without a release listing (oracle, graalvm) resolve the newest GA major through the Adoptium available-releases API first.

Coverage and navigation

  • Added a note that advanced usage examples target the unreleased @v6 on main while the README pins @v5, listing which inputs are V6-only. This was the most likely source of user confusion, since the two documents pin different versions on purpose.
  • Added an IBM Semeru section (it was a supported distribution with no example) and the missing TOC/nav entries for Oracle OpenJDK, Semeru, platform compatibility, settings path, problem matcher, and JDK caching.
  • Added JDK caching to README's "What it does", replaced the retired ubuntu-20.04 runner in an example, and fixed a heading that was h4 instead of h2.

All same-file and cross-file markdown anchors were validated programmatically after the edits.

Related issue:
N/A

Check list:

  • Ran npm run check locally (format, lint, build, test) and all checks pass. Not run: this is a markdown-only change, no node_modules in the worktree, and format-check only covers **/*.{ts,yml,yaml}. No source, test, or dist/ files are touched.
  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.
- Fix stale claim that java-version and distribution are always mandatory
- Fix security note that claimed no checksum/signature verification exists
- Fix jdkfile toolchain example ID (jdkfile_1.6, not Oracle_1.6)
- Clarify default toolchain ID derives from the vendor, not the distribution
- Drop stale liberica-nik fallback claim; unsupported packages are rejected
- Document IBM Semeru and add missing TOC/nav entries
- Note that advanced-usage examples target the unreleased v6 on main
- Replace retired ubuntu-20.04 runner and fix a heading level

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 5, 2026 02:05
@brunoborges
brunoborges requested a review from a team as a code owner August 5, 2026 02:05
@brunoborges
brunoborges merged commit 2924169 into actions:main Aug 5, 2026
3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Documentation-focused PR to align README.md and docs/advanced-usage.md with the action’s current behavior (inputs, caching, toolchains, distribution/version resolution), reducing user confusion.

Changes:

  • Updated README descriptions and navigation to reflect current behavior (JDK caching, latest resolution behavior, toolchain ID default).
  • Updated advanced usage guidance (v6 vs v5 note, distribution/version-file requirements, Semeru example, toolchain ID semantics, security warning wording).
  • Expanded/updated TOC and cross-document links to cover additional sections.
Show a summary per file
File Description
README.md Adjusts feature list and input defaults/docs, plus adds advanced-usage navigation links.
docs/advanced-usage.md Updates guidance/examples/TOC to match current behavior and clarify v6 vs v5 usage.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 3
  • Review effort level: Lite
Comment thread README.md
| `gpg-private-key` | GPG private key to import. | |
| `gpg-passphrase-env-var` | Environment variable name for the GPG private key passphrase. | `GPG_PASSPHRASE` when a key is set |
| `mvn-toolchain-id` | Maven Toolchain ID. When multiple Java versions are installed, the number of IDs must match the number of versions. | `${distribution}_${java-version}` |
| `mvn-toolchain-id` | Maven Toolchain ID. When multiple Java versions are installed, the number of IDs must match the number of versions. | `${vendor}_${java-version}` |
Comment thread docs/advanced-usage.md
Comment on lines +41 to +48
> [!NOTE]
> The examples on this page reference `actions/setup-java@v6`, which is still in
> development on the `main` branch and is not yet published as a release tag. To
> try the V6 features documented here (`cache-jdk`, `force-download`,
> `problem-matcher`, `cache-path`, `cache-read-only`, `java-version: latest`,
> `oracle-openjdk`, and the `*-env-var` input names), reference
> `actions/setup-java@main`. For production workflows use the latest stable
> release, `actions/setup-java@v5`, as shown in the [README](../README.md).
Comment thread docs/advanced-usage.md
Comment on lines 50 to +51
## Selecting a Java distribution
Inputs `java-version` and `distribution` are mandatory and needs to be provided. See [Supported distributions](../README.md#Supported-distributions) for a list of available options.
`java-version` and `distribution` select what gets installed. `java-version` may be replaced by `java-version-file`, and `distribution` is optional only when `java-version-file` points to a `.sdkmanrc` or `.tool-versions` file that carries a recognized vendor identifier. In every other case both inputs must be provided. See [Supported distributions](../README.md#Supported-distributions) for a list of available options.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants