diff --git a/README.md b/README.md index 844fa993..43ccda0a 100644 --- a/README.md +++ b/README.md @@ -18,11 +18,6 @@ The `setup-java` action provides the following functionality for GitHub Actions This action allows you to work with Java and Scala projects. -## V2 vs V1 - -- V2 supports custom distributions and provides support for Azul Zulu OpenJDK, Eclipse Temurin and AdoptOpenJDK out of the box. V1 supports only Azul Zulu OpenJDK. -- V2 requires you to specify distribution along with the version. V1 defaults to Azul Zulu OpenJDK, only version input is required. Follow [the migration guide](docs/switching-to-v2.md) to switch from V1 to V2. - ## Usage - `java-version`: The Java version that is going to be set up. Takes a whole or [semver](#supported-version-syntax) Java version. If not specified, the action will expect `java-version-file` input to be specified. diff --git a/__tests__/distributors/graalvm-installer.test.ts b/__tests__/distributors/graalvm-installer.test.ts index e94426de..8a84eb8e 100644 --- a/__tests__/distributors/graalvm-installer.test.ts +++ b/__tests__/distributors/graalvm-installer.test.ts @@ -114,7 +114,7 @@ describe('GraalVMDistribution', () => { const osType = distribution.getPlatform(); if (osType === 'windows' && distroArch === 'aarch64') { - return; // skip, aarch64 is not available for Windows + test.skip('Skipping test: aarch64 is not available for Windows'); } const archiveType = getDownloadArchiveExtension(); diff --git a/dist/cleanup/index.js b/dist/cleanup/index.js index ebb7797c..8e3cba5b 100644 --- a/dist/cleanup/index.js +++ b/dist/cleanup/index.js @@ -93676,8 +93676,8 @@ function convertVersionToSemver(version) { return mainVersion; } exports.convertVersionToSemver = convertVersionToSemver; -function getGitHubHttpHeaders(token) { - const resolvedToken = token || core.getInput('token'); +function getGitHubHttpHeaders() { + const resolvedToken = process.env.GITHUB_TOKEN || core.getInput('token'); const auth = !resolvedToken ? undefined : `token ${resolvedToken}`; const headers = { accept: 'application/vnd.github.VERSION.raw' diff --git a/dist/setup/index.js b/dist/setup/index.js index 5b4dae51..f00761e3 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -131671,8 +131671,8 @@ function convertVersionToSemver(version) { return mainVersion; } exports.convertVersionToSemver = convertVersionToSemver; -function getGitHubHttpHeaders(token) { - const resolvedToken = token || core.getInput('token'); +function getGitHubHttpHeaders() { + const resolvedToken = process.env.GITHUB_TOKEN || core.getInput('token'); const auth = !resolvedToken ? undefined : `token ${resolvedToken}`; const headers = { accept: 'application/vnd.github.VERSION.raw' diff --git a/src/util.ts b/src/util.ts index c59556af..78ee1322 100644 --- a/src/util.ts +++ b/src/util.ts @@ -183,8 +183,8 @@ export function convertVersionToSemver(version: number[] | string) { return mainVersion; } -export function getGitHubHttpHeaders(token?: string): OutgoingHttpHeaders { - const resolvedToken = token || core.getInput('token'); +export function getGitHubHttpHeaders(): OutgoingHttpHeaders { + const resolvedToken = process.env.GITHUB_TOKEN || core.getInput('token'); const auth = !resolvedToken ? undefined : `token ${resolvedToken}`; const headers: OutgoingHttpHeaders = {