mirror of
https://github.com/actions/setup-java.git
synced 2025-07-04 10:40:54 +00:00
github token accept through environment variable
This commit is contained in:
parent
6992528a74
commit
4c9e711992
@ -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.
|
||||
|
@ -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();
|
||||
|
4
dist/cleanup/index.js
vendored
4
dist/cleanup/index.js
vendored
@ -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'
|
||||
|
4
dist/setup/index.js
vendored
4
dist/setup/index.js
vendored
@ -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'
|
||||
|
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user