| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Adds a new force-download input to actions/setup-java to bypass potentially system-modified runner tool-cache JDKs (e.g., modified cacerts) and ensure reproducible JDK artifacts by always downloading/unpacking and re-caching the requested version.
Changes:
| File | Description |
|---|---|
| src/setup-java.ts | Reads force-download input and forwards it into JavaInstallerOptions. |
| src/distributions/local/installer.ts | Skips tool-cache resolution for jdkfile installs when force-download is enabled. |
| src/distributions/base-models.ts | Extends installer options model with forceDownload. |
| src/distributions/base-installer.ts | Implements tool-cache bypass in the common installer flow and ensures latest-resolution doesn’t fall back to cache when forced. |
| src/constants.ts | Adds INPUT_FORCE_DOWNLOAD constant. |
| README.md | Documents the new force-download input and its reproducibility motivation. |
| action.yml | Declares force-download input for the action. |
| tests/distributors/local-installer.test.ts | Adds coverage for jdkfile extraction path when force-download is enabled. |
| tests/distributors/base-installer.test.ts | Adds coverage ensuring tool-cache lookup is skipped when force-download is enabled. |
| dist/setup/index.js | Updates bundled action output to include force-download behavior. |
| dist/cleanup/index.js | Updates bundled cleanup output to include the new constant. |
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/distributions/local/installer.ts:35
let foundJava = this.forceDownload ? null : this.findInToolcache();
if (foundJava) {
core.info(`Resolved Java ${foundJava.version} from tool-cache`);
} else {
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description:
Runner-cached JDKs may contain system-modified certificate stores, producing non-reproducible runtime images.
Related issue:
Check list: