mirror of
https://github.com/actions/setup-java.git
synced 2026-08-18 18:52:57 +00:00
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:
Vendored
+3
-8
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user