mirror of
https://gitea.com/actions/setup-java.git
synced 2025-10-15 03:40:14 +08:00
Adding maven auth support
This commit is contained in:
@@ -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() {
|
||||
@@ -14,6 +15,13 @@ async function run() {
|
||||
|
||||
await installer.getJava(version, arch, jdkFile, javaPackage);
|
||||
|
||||
const username = core.getInput('username', {required: false});
|
||||
const password = core.getInput('password', {required: false});
|
||||
|
||||
if (username && password) {
|
||||
await auth.configAuthentication(username, password);
|
||||
}
|
||||
|
||||
const matchersPath = path.join(__dirname, '..', '.github');
|
||||
console.log(`##[add-matcher]${path.join(matchersPath, 'java.json')}`);
|
||||
} catch (error) {
|
||||
|
Reference in New Issue
Block a user