Compare commits

..

67 Commits

Author SHA1 Message Date
b74d5a6a96 Merge pull request #33 from actions/master
Merge master into releases/v1
2020-01-02 11:32:54 -05:00
b52cd69bd2 Update workflow.yml 2019-12-31 01:04:50 -05:00
ae23cbb7c2 Update master with dependabot fixes 2019-12-31 00:51:09 -05:00
4bec33ae89 Merge pull request #36 from actions/dependabot/npm_and_yarn/handlebars-4.5.3
Bump handlebars from 4.1.2 to 4.5.3
2019-12-31 00:33:27 -05:00
0e40802452 Merge pull request #35 from foo-actions/master
Add more robust support for EA version specification
2019-12-31 00:25:51 -05:00
5c4dee6c5e Bump handlebars from 4.1.2 to 4.5.3
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.2 to 4.5.3.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.1.2...v4.5.3)

Signed-off-by: dependabot[bot] <support@github.com>
2019-12-29 19:05:41 +00:00
ae687a76f9 Update index.js 2019-12-21 19:56:10 -08:00
f8061412c6 Add support for matching -ea version formats
This will support specifying EA versions in the following format examples. E.g.:
14-ea
14.0.0-ea
14.0.0-ea.28
Notes:
 - For the last form above, which is needed for requesting a specific ea build, we must only add '.x' if there are less than 3 dots in the version, hence the change from != 3 to < 3
- The prior parsing logic for e.g. 14.0.0-ea "spelling" will ignore precedence between build numbers in the form of e.g. 14.0.0-ea+b27 vs. 14.0.0-ea+b27 (so it will end up with the earliest rather than the latest ea build in the cdn), and does not allow specifying an ea build number (it will match 14.0.0-ea+b29 to a cdn 14.0.0-ea+b2). The new logic [copupled with the CDN populating EA builds in the form 14.0.0-ea.28) will resolve that.
2019-12-21 19:51:32 -08:00
d8ada524fc Merge pull request #29 from clarkbw/maven-auth
Adding maven auth support
2019-12-20 14:48:30 -05:00
9b11fe4b5d Add defaults descriptions to actions.yml 2019-12-20 08:35:06 -08:00
2ccd1ad125 Add examples of the settings.xml file generated 2019-12-19 15:44:10 -08:00
c05b45bb91 Update README with env sections 2019-12-19 15:39:48 -08:00
7e36086f36 Pass undefined when empty 2019-12-19 14:20:17 -08:00
0e5545ead5 improve tests 2019-12-19 14:18:54 -08:00
1bba665156 Try env variables 2019-12-19 11:28:11 -08:00
6924f73ee0 Address latest review feedback 2019-12-19 08:52:26 -08:00
998be8d08f Add default to settings-path description
Co-Authored-By: Chris Patterson <chrispat@github.com>
2019-12-18 11:05:01 -08:00
2e749e50a6 Update settings-path for github.workspace 2019-12-10 14:25:15 -08:00
ce88feea94 Move to settings-path 2019-12-10 13:02:21 -08:00
ae11e1a1b6 Allow for alternate settings.xml file location
Use the m2-home to specify a new location for the settings.xml file
2019-12-10 10:03:33 -08:00
4757680fc9 Add Shared Runner to README
Be the docs for the feature you want to see. #docsdrivendevelopment
2019-12-10 09:37:07 -08:00
551e2a2770 sanitzie XML characters 2019-12-10 09:26:51 -08:00
9d56a3bd35 prettier fixup 2019-12-10 09:26:42 -08:00
8ccac94e40 README Small spelling fix. Also some rewording
Co-Authored-By: Konrad Pabjan <konradpabjan@github.com>
2019-12-09 12:16:15 -05:00
203550b542 Add Gradle example to README 2019-12-06 16:21:27 -05:00
2f85cc5281 Merge branch 'maven-auth' of github.com:clarkbw/setup-java into maven-auth 2019-12-06 16:14:53 -05:00
70aff31eb7 Apply suggestions from code review
Co-Authored-By: Konrad Pabjan <konradpabjan@github.com>
2019-12-06 15:31:28 -05:00
ddf78adea0 Add note about $HOME directory usage 2019-12-06 14:50:30 -05:00
f33acc6b4f build release 2019-12-06 14:46:43 -05:00
6ae690c576 Add test for overwrite 2019-12-06 14:46:35 -05:00
b7e70417f9 Remove last trailing space 2019-12-06 14:36:32 -05:00
dbeab7ccf2 Remove trailing spaces and long lines 2019-12-06 14:35:32 -05:00
540a98ac02 Wrap long lines in action.yml 2019-12-06 14:33:05 -05:00
4b6ff8caf0 Format auth 2019-12-06 14:32:51 -05:00
8940139ee8 Be explicit about second flag 2019-12-06 14:28:34 -05:00
5e29577d7b Remote options from log 2019-12-06 14:28:17 -05:00
1dac4fef05 Use $HOME directory 2019-12-06 14:25:41 -05:00
797045350f code == EEXIST 2019-12-05 00:54:26 -05:00
948db7588e strringify the logs 2019-12-05 00:48:15 -05:00
2b05c00514 logging code 2019-12-05 00:45:56 -05:00
96236d7072 return but shoudl still fail 2019-12-05 00:43:41 -05:00
12896dfb0f logging options 2019-12-05 00:41:50 -05:00
bfbec53132 log when we overwrite the file 2019-12-04 23:54:21 -05:00
c1c11bbc1b Examples use v1 instead of master
Co-Authored-By: Konrad Pabjan <konradpabjan@github.com>
2019-12-04 23:22:47 -05:00
cfdbba3eb5 Merge pull request #32 from dzirbel/patch-1
Fix typo in README.md
2019-12-04 09:50:34 -05:00
abe10fa040 Fix typo in README.md 2019-11-29 22:53:14 -08:00
d5150a6a67 Add publish to Maven Central example to README 2019-11-29 09:26:29 -08:00
210fba7587 Add note about pom.xml to README 2019-11-28 14:52:51 -08:00
ade090c5cf Update index.js 2019-11-28 14:48:39 -08:00
d2eada383a direct ncc to setup-java 2019-11-28 14:48:36 -08:00
cda418e54a Update index.js 2019-11-28 14:22:38 -08:00
d1d9006723 Add fields to action.yml 2019-11-28 14:18:30 -08:00
7d69f8015b build index.js 2019-11-28 14:13:43 -08:00
c8f8a264b4 Add publish section to README 2019-11-28 14:13:35 -08:00
1085a2b8cf Use console.log where appropriate
Update gitattributes and remove lib files
2019-11-28 13:35:47 -08:00
495409509c parent 52c60e0768c1c2fabcab3acf97aa77c5dbc32dfa
author Bryan Clark <clarkbw@github.com> 1573862473 -0800
committer Bryan Clark <clarkbw@github.com> 1574976093 -0800

Adding maven auth support

ignore vscode directory

move required parameters to auth module

username and password are required from within the auth module now.  Update the tests to ensure this is the case.

Add generated auth and setup-java

Move auth to the bottom of setup

Support ids

generated and pretty files

use server-id instead of ambigous id

Use console.log where appropriate

Adding maven auth support

ignore vscode directory

move required parameters to auth module

username and password are required from within the auth module now.  Update the tests to ensure this is the case.

Add generated auth and setup-java

Move auth to the bottom of setup

generated and pretty files

use server-id instead of ambigous id
2019-11-28 13:35:47 -08:00
18983b8d3d Update gitattributes and remove lib files 2019-11-28 13:35:47 -08:00
4450e92d78 Use gitattributes to ignore generated lib js files 2019-11-28 13:35:47 -08:00
b8a0027e2c Use console.log where appropriate 2019-11-28 13:35:47 -08:00
24327359f8 use server-id instead of ambigous id 2019-11-28 13:35:47 -08:00
dc5f78f54d generated and pretty files 2019-11-28 13:35:47 -08:00
b0e5cf270d Support ids 2019-11-28 13:35:47 -08:00
1b0417032a Move auth to the bottom of setup 2019-11-28 13:35:47 -08:00
86e89385e5 Add generated auth and setup-java 2019-11-28 13:35:47 -08:00
56eacf97f5 move required parameters to auth module
username and password are required from within the auth module now.  Update the tests to ensure this is the case.
2019-11-28 13:35:47 -08:00
56b5af70cf ignore vscode directory 2019-11-28 13:35:47 -08:00
a3e6ce2153 Adding maven auth support 2019-11-28 13:35:47 -08:00
13 changed files with 394 additions and 16 deletions

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
dist/index.js -diff -merge
dist/index.js linguist-generated=true

View File

@ -1,5 +1,5 @@
name: Main workflow
on: [push]
on: [push, pull_request]
jobs:
run:
name: Run

1
.gitignore vendored
View File

@ -93,3 +93,4 @@ typings/
# DynamoDB Local files
.dynamodb/
.vscode/

128
README.md
View File

@ -13,7 +13,7 @@ This action sets up a java environment for use in actions by:
See [action.yml](action.yml)
Basic:
## Basic
```yaml
steps:
- uses: actions/checkout@v1
@ -25,7 +25,7 @@ steps:
- run: java -cp java HelloWorldApp
```
From local file:
## Local file
```yaml
steps:
- uses: actions/checkout@v1
@ -37,7 +37,7 @@ steps:
- run: java -cp java HelloWorldApp
```
Matrix Testing:
## Matrix Testing
```yaml
jobs:
build:
@ -45,7 +45,7 @@ jobs:
strategy:
matrix:
# test against latest update of each major Java version, as well as specific updates of LTS versions:
java: [ 1.6, 6.0.83, 7, 7.0.181, 8, 8.0.192, 9.0,x, 10, 11.0.x, 11.0.3, 12, 13 ]
java: [ 1.6, 6.0.83, 7, 7.0.181, 8, 8.0.192, 9.0.x, 10, 11.0.x, 11.0.3, 12, 13 ]
name: Java ${{ matrix.java }} sample
steps:
- uses: actions/checkout@master
@ -56,6 +56,126 @@ jobs:
- run: java -cp java HelloWorldApp
```
## Publishing using Apache Maven
```yaml
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Publish to GitHub Packages Apache Maven
run: mvn deploy
env:
GITHUB_TOKEN: ${{ github.token }} # GITHUB_TOKEN is the default env for the password
- name: Set up Apache Maven Central
uses: actions/setup-java@v1
with: # running setup-java again overwrites the settings.xml
java-version: 1.8
server-id: maven # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME # env variable for username in deploy
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
- name: Publish to Apache Maven Central
run: mvn deploy
env:
MAVEN_USERNAME: maven_username123
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
```
The two `settings.xml` files created from the above example look like the following.
`settings.xml` file created for the first deploy to GitHub Packages
```xml
<servers>
<server>
<id>github</id>
<username>${env.GITHUB_ACTOR}</username>
<password>${env.GITHUB_TOKEN}</password>
</server>
</servers>
```
`settings.xml` file created for the second deploy to Apache Maven Central
```xml
<servers>
<server>
<id>maven</id>
<username>${env.MAVEN_USERNAME}</username>
<password>${env.MAVEN_CENTRAL_TOKEN}</password>
</server>
</servers>
```
***NOTE: The `settings.xml` file is created in the Actions $HOME directory. If you have an existing `settings.xml` file at that location, it will be overwritten. See below for using the `settings-path` to change your `settings.xml` file location.***
See the help docs on [Publishing a Package](https://help.github.com/en/github/managing-packages-with-github-packages/configuring-apache-maven-for-use-with-github-packages#publishing-a-package) for more information on the `pom.xml` file.
## Publishing using Gradle
```yaml
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
- name: Build with Gradle
run: gradle build
- name: Publish to GitHub Packages
run: gradle publish
env:
USERNAME: ${{ github.actor }}
PASSWORD: ${{ secrets.GITHUB_TOKEN }}
```
***NOTE: The `USERNAME` and `PASSWORD` need to correspond to the credentials environment variables used in the publishing section of your `build.gradle`.***
See the help docs on [Publishing a Package with Gradle](https://help.github.com/en/github/managing-packages-with-github-packages/configuring-gradle-for-use-with-github-packages#example-using-gradle-groovy-for-a-single-package-in-a-repository) for more information on the `build.gradle` configuration file.
## Apache Maven with a settings path
When using an Actions self-hosted runner with multiple shared runners the default `$HOME` directory can be shared by a number runners at the same time which could overwrite existing settings file. Setting the `settings-path` variable allows you to choose a unique location for your settings file.
```yaml
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8 for Shared Runner
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ github.token }}
```
# License
The scripts and documentation in this project are released under the [MIT License](LICENSE)

144
__tests__/auth.test.ts Normal file
View File

@ -0,0 +1,144 @@
import io = require('@actions/io');
import fs = require('fs');
import os = require('os');
import path = require('path');
// make the os.homedir() call be local to the tests
jest.doMock('os', () => {
return {
homedir: jest.fn(() => __dirname)
};
});
import * as auth from '../src/auth';
const m2Dir = path.join(__dirname, auth.M2_DIR);
const settingsFile = path.join(m2Dir, auth.SETTINGS_FILE);
describe('auth tests', () => {
beforeEach(async () => {
await io.rmRF(m2Dir);
}, 300000);
afterAll(async () => {
try {
await io.rmRF(m2Dir);
} catch {
console.log('Failed to remove test directories');
}
}, 100000);
it('creates settings.xml in alternate locations', async () => {
const id = 'packages';
const username = 'UNAMI';
const password = 'TOLKIEN';
const altHome = path.join(__dirname, 'runner', 'settings');
const altSettingsFile = path.join(altHome, auth.SETTINGS_FILE);
process.env[`INPUT_SETTINGS-PATH`] = altHome;
await io.rmRF(altHome); // ensure it doesn't already exist
await auth.configAuthentication(id, username, password);
expect(fs.existsSync(m2Dir)).toBe(false);
expect(fs.existsSync(settingsFile)).toBe(false);
expect(fs.existsSync(altHome)).toBe(true);
expect(fs.existsSync(altSettingsFile)).toBe(true);
expect(fs.readFileSync(altSettingsFile, 'utf-8')).toEqual(
auth.generate(id, username, password)
);
delete process.env[`INPUT_SETTINGS-PATH`];
await io.rmRF(altHome);
}, 100000);
it('creates settings.xml with username and password', async () => {
const id = 'packages';
const username = 'UNAME';
const password = 'TOKEN';
await auth.configAuthentication(id, username, password);
expect(fs.existsSync(m2Dir)).toBe(true);
expect(fs.existsSync(settingsFile)).toBe(true);
expect(fs.readFileSync(settingsFile, 'utf-8')).toEqual(
auth.generate(id, username, password)
);
}, 100000);
it('overwrites existing settings.xml files', async () => {
const id = 'packages';
const username = 'USERNAME';
const password = 'PASSWORD';
fs.mkdirSync(m2Dir, {recursive: true});
fs.writeFileSync(settingsFile, 'FAKE FILE');
expect(fs.existsSync(m2Dir)).toBe(true);
expect(fs.existsSync(settingsFile)).toBe(true);
await auth.configAuthentication(id, username, password);
expect(fs.existsSync(m2Dir)).toBe(true);
expect(fs.existsSync(settingsFile)).toBe(true);
expect(fs.readFileSync(settingsFile, 'utf-8')).toEqual(
auth.generate(id, username, password)
);
}, 100000);
it('does not create settings.xml without required parameters', async () => {
await auth.configAuthentication('FOO');
expect(fs.existsSync(m2Dir)).toBe(true);
expect(fs.existsSync(settingsFile)).toBe(true);
expect(fs.readFileSync(settingsFile, 'utf-8')).toEqual(
auth.generate('FOO', auth.DEFAULT_USERNAME, auth.DEFAULT_PASSWORD)
);
await auth.configAuthentication(undefined, 'BAR', undefined);
expect(fs.existsSync(m2Dir)).toBe(true);
expect(fs.existsSync(settingsFile)).toBe(true);
expect(fs.readFileSync(settingsFile, 'utf-8')).toEqual(
auth.generate(auth.DEFAULT_ID, 'BAR', auth.DEFAULT_PASSWORD)
);
await auth.configAuthentication(undefined, undefined, 'BAZ');
expect(fs.existsSync(m2Dir)).toBe(true);
expect(fs.existsSync(settingsFile)).toBe(true);
expect(fs.readFileSync(settingsFile, 'utf-8')).toEqual(
auth.generate(auth.DEFAULT_ID, auth.DEFAULT_USERNAME, 'BAZ')
);
await auth.configAuthentication();
expect(fs.existsSync(m2Dir)).toBe(true);
expect(fs.existsSync(settingsFile)).toBe(true);
expect(fs.readFileSync(settingsFile, 'utf-8')).toEqual(
auth.generate(
auth.DEFAULT_ID,
auth.DEFAULT_USERNAME,
auth.DEFAULT_PASSWORD
)
);
}, 100000);
it('escapes invalid XML inputs', () => {
const id = 'packages';
const username = 'USER';
const password = '&<>"\'\'"><&';
expect(auth.generate(id, username, password)).toEqual(`
<settings>
<servers>
<server>
<id>${id}</id>
<username>\${env.${username}}</username>
<password>\${env.&amp;&lt;&gt;&quot;&apos;&apos;&quot;&gt;&lt;&amp;}</password>
</server>
</servers>
</settings>
`);
});
});

View File

@ -1,9 +1,11 @@
name: 'Setup Java JDK'
description: 'Set up a specific version of the Java JDK and add the command-line tools to the PATH'
description: 'Set up a specific version of the Java JDK and add the
command-line tools to the PATH'
author: 'GitHub'
inputs:
inputs:
java-version:
description: 'The Java version to make available on the path. Takes a whole or semver Java version, or 1.x syntax (e.g. 1.8 => Java 8.x)'
description: 'The Java version to make available on the path. Takes a whole
or semver Java version, or 1.x syntax (e.g. 1.8 => Java 8.x)'
required: true
java-package:
description: 'The package type (jre, jdk, jdk+fx)'
@ -14,7 +16,23 @@ inputs:
required: false
default: 'x64'
jdkFile:
description: 'Path to where the compressed JDK is located. The path could be in your source repository or a local path on the agent.'
description: 'Path to where the compressed JDK is located. The path could
be in your source repository or a local path on the agent.'
required: false
server-id:
description: 'ID of the distributionManagement repository in the pom.xml
file. Default is `github`'
required: false
server-username:
description: 'Environment variable name for the username for authentication
to the Apache Maven repository. Default is $GITHUB_ACTOR'
required: false
server-password:
description: 'Environment variable name for password or token for
authentication to the Apache Maven repository. Default is $GITHUB_TOKEN'
required: false
settings-path:
description: 'Path to where the settings.xml file will be written. Default is ~/.m2.'
required: false
runs:
using: 'node12'

BIN
dist/index.js generated vendored

Binary file not shown.

BIN
dist/unzip vendored Normal file

Binary file not shown.

6
package-lock.json generated
View File

@ -2289,9 +2289,9 @@
"dev": true
},
"handlebars": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz",
"integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==",
"version": "4.5.3",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz",
"integrity": "sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==",
"dev": true,
"requires": {
"neo-async": "^2.6.0",

View File

@ -5,10 +5,11 @@
"description": "setup java action",
"main": "dist/index.js",
"scripts": {
"build": "tsc",
"build": "ncc build src/setup-java.ts",
"format": "prettier --write **/*.ts",
"format-check": "prettier --check **/*.ts",
"release": "ncc build && git add -f dist/",
"prerelease": "npm run-script build",
"release": "git add -f dist/index.js",
"test": "jest"
},
"repository": {

74
src/auth.ts Normal file
View File

@ -0,0 +1,74 @@
import * as fs from 'fs';
import * as os from 'os';
import * as path from 'path';
import * as core from '@actions/core';
import * as io from '@actions/io';
export const M2_DIR = '.m2';
export const SETTINGS_FILE = 'settings.xml';
export const DEFAULT_ID = 'github';
export const DEFAULT_USERNAME = 'GITHUB_ACTOR';
export const DEFAULT_PASSWORD = 'GITHUB_TOKEN';
export async function configAuthentication(
id = DEFAULT_ID,
username = DEFAULT_USERNAME,
password = DEFAULT_PASSWORD
) {
console.log(
`creating ${SETTINGS_FILE} with server-id: ${id};`,
`environment variables: username=\$${username} and password=\$${password}`
);
// when an alternate m2 location is specified use only that location (no .m2 directory)
// otherwise use the home/.m2/ path
const directory: string = path.join(
core.getInput('settings-path') || os.homedir(),
core.getInput('settings-path') ? '' : M2_DIR
);
await io.mkdirP(directory);
core.debug(`created directory ${directory}`);
await write(directory, generate(id, username, password));
}
function escapeXML(value: string) {
return value
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&apos;');
}
// only exported for testing purposes
export function generate(
id = DEFAULT_ID,
username = DEFAULT_USERNAME,
password = DEFAULT_PASSWORD
) {
return `
<settings>
<servers>
<server>
<id>${escapeXML(id)}</id>
<username>\${env.${escapeXML(username)}}</username>
<password>\${env.${escapeXML(password)}}</password>
</server>
</servers>
</settings>
`;
}
async function write(directory: string, settings: string) {
const location = path.join(directory, SETTINGS_FILE);
if (fs.existsSync(location)) {
console.warn(`overwriting existing file ${location}`);
} else {
console.log(`writing ${location}`);
}
return fs.writeFileSync(location, settings, {
encoding: 'utf-8',
flag: 'w'
});
}

View File

@ -266,8 +266,17 @@ function normalizeVersion(version: string): string {
}
}
// Add trailing .x if it is missing
if (version.split('.').length != 3) {
if (version.endsWith('-ea')) {
// convert e.g. 14-ea to 14.0.0-ea
if (version.indexOf('.') == -1) {
version = version.slice(0, version.length - 3) + '.0.0-ea';
}
// match anything in -ea.X (semver won't do .x matching on pre-release versions)
if (version[0] >= '0' && version[0] <= '9') {
version = '>=' + version;
}
} else if (version.split('.').length < 3) {
// For non-ea versions, add trailing .x if it is missing
if (version[version.length - 1] != 'x') {
version = version + '.x';
}

View File

@ -1,5 +1,6 @@
import * as core from '@actions/core';
import * as installer from './installer';
import * as auth from './auth';
import * as path from 'path';
async function run() {
@ -16,6 +17,14 @@ async function run() {
const matchersPath = path.join(__dirname, '..', '.github');
console.log(`##[add-matcher]${path.join(matchersPath, 'java.json')}`);
const id = core.getInput('server-id', {required: false}) || undefined;
const username =
core.getInput('server-username', {required: false}) || undefined;
const password =
core.getInput('server-password', {required: false}) || undefined;
await auth.configAuthentication(id, username, password);
} catch (error) {
core.setFailed(error.message);
}