* Fix import-safe checks when scripts are run from a path with symlinks
In v6, setup-java was made "import-safe" to facilitate testing. This
prevents setup-java & cleanup-java from doing anything when their
sources get imported.
This works fine in the general case, but actually invoking the script
(`node setup-java/index.js`) when the path to the script contains
symlinks led to the script incorrectly believing it was imported, and
refuse to actually run.
To fix this, we pass `process.argv[1]` through `fs.realpathSync`, which
resolves symlinks in the path.
Fixes#1264
* Preserve import safety when resolving symlink entrypoints
Share entrypoint detection between setup and cleanup, handle non-file entrypoints safely, and normalize both paths for preserved symlinks. Add real-process regression coverage and rebuild action bundles.
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 831c32f2-a275-45bd-a92b-c387372a1554
* Update js-yaml to fix merge-source denial of service
Bump the transitive development dependency from 3.15.1 to 3.15.2 to address GHSA-2883-xcg3-v3hh without changing dependency ranges or CI checks.
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 831c32f2-a275-45bd-a92b-c387372a1554
---------
Co-authored-by: Bruno Borges <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 831c32f2-a275-45bd-a92b-c387372a1554
* Add JDK caching
Cache resolved JDK tool-cache entries by exact platform and release identity, with a default-on cache-jdk input and explicit opt-out.
Co-authored-by: Copilot App <[email protected]>
* Apply batched suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
* Fix JDK cache CI validation
Co-authored-by: Copilot App <[email protected]>
* Update brace-expansion security fix
Co-authored-by: Copilot App <[email protected]>
* Refresh brace-expansion license metadata
Co-authored-by: Copilot App <[email protected]>
* Refine JDK cache semantics
Co-authored-by: Copilot App <[email protected]>
* Refine JDK cache documentation
Co-authored-by: Copilot App <[email protected]>
* Simplify JDK cache identity
Use one normalized runner OS dimension, reset the internal cache key schema for the unreleased feature, and align documentation, tests, and bundles.
Co-authored-by: Copilot App <[email protected]>
* Align JDK cache OS identity
Use the established RUNNER_OS value directly and retain process.platform only as a non-Actions fallback.
Co-authored-by: Copilot App <[email protected]>
* Harden JDK cache saves and document tool-cache reuse
Bind each JDK cache key to the installation identity it was computed for,
keep post-job saves best-effort per entry, and state the real reuse and
verification guarantee in the documentation.
Co-authored-by: Copilot App <[email protected]>
* docs: restructure README caching section
Rename '## Caching dependencies' to '## Caching' and add a what-gets-cached
overview table covering the dependency, wrapper, and JDK caches. Lead with the
common 'cache: maven' example and the dependency-cache material, and demote JDK
caching into its own subsection.
Also corrects the IMPORTANT callout, which implied JDK caching required an
explicit opt-in; it is enabled implicitly whenever 'cache' is set.
Co-authored-by: Copilot App <[email protected]>
* docs: fix caching documentation defects
- Remove pull-request framing that compared behavior to `main`; state the
tool-cache and `jdkfile` behavior directly and unconditionally.
- Clarify that the JDK cache is a separate cache *entry* from the dependency
and wrapper caches, while its *enablement* is coupled to `cache`, so the
opening paragraph agrees with the enablement matrix.
- Cite the actions/setup-java-benchmarks repository instead of an open PR and
a self-referential PR comment, keeping the measured figures and caveats.
- Keep the `cache`/`cache-jdk` matrix only in docs/advanced-usage.md and
summarize the rules in prose in README.md to avoid divergence.
- Describe the guarantee that a cache key is only saved with the installation
it was computed for, instead of documenting inode/size/timestamp internals.
Co-authored-by: Copilot App <[email protected]>
* docs: add V6 what's new entry for JDK caching
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: e2755464-4e83-47b6-ba71-731bb481b418
---------
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Copilot-Session: e2755464-4e83-47b6-ba71-731bb481b418