Update setup-java for Microsoft's Build of OpenJDK: now pointing task to CDN that is always up-to-date (#1236)

* Updated microsoft openjdk setup-java action

* Update generated distribution

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Applied new fixes from npm run check

* Update generated distribution

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
jmjaffe37
2026-08-14 01:10:57 -04:00
committed by GitHub
co-authored by Copilot Autofix powered by AI
parent d2bb5a81bf
commit 3487f54461
6 changed files with 116400 additions and 20 deletions
+3 -8
View File
@@ -125,15 +125,10 @@ class MicrosoftDistributions extends base_installer/* JavaBase */.O {
return true;
}
async getAvailableVersions() {
// TODO get these dynamically!
// We will need Microsoft to add an endpoint where we can query for versions.
const owner = 'actions';
const repository = 'setup-java';
const branch = 'main';
const filePath = 'src/distributions/microsoft/microsoft-openjdk-versions.json';
let releases = null;
const fileUrl = `https://api.github.com/repos/${owner}/${repository}/contents/${filePath}?ref=${branch}`;
const headers = (0,util/* getGitHubHttpHeaders */.U_)();
const fileUrl = `https://aka.ms/download-jdk/microsoft-openjdk-versions.json`;
// Avoid leaking the GitHub token to a non-GitHub host (aka.ms redirects to a CDN).
const headers = { accept: 'application/json' };
let response = null;
if (core/* isDebug */._o()) {
console.time('Retrieving available versions for Microsoft took'); // eslint-disable-line no-console