mirror of
https://github.com/actions/setup-java.git
synced 2024-08-16 10:19:51 +02:00
fixed setSecret
This commit is contained in:
parent
d94db22179
commit
e494666ae9
2 changed files with 7 additions and 5 deletions
5
dist/setup/index.js
vendored
5
dist/setup/index.js
vendored
|
@ -28628,8 +28628,6 @@ const DEFAULT_GPG_PASSPHRASE = 'GPG_PASSPHRASE';
|
||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
// Set secrets before use
|
|
||||||
core.setSecret('gpg-private-key');
|
|
||||||
let version = core.getInput('version');
|
let version = core.getInput('version');
|
||||||
if (!version) {
|
if (!version) {
|
||||||
version = core.getInput('java-version', { required: true });
|
version = core.getInput('java-version', { required: true });
|
||||||
|
@ -28647,6 +28645,9 @@ function run() {
|
||||||
DEFAULT_GPG_PRIVATE_KEY;
|
DEFAULT_GPG_PRIVATE_KEY;
|
||||||
const gpgPassphrase = core.getInput('gpg-passphrase', { required: false }) ||
|
const gpgPassphrase = core.getInput('gpg-passphrase', { required: false }) ||
|
||||||
(gpgPrivateKey ? DEFAULT_GPG_PASSPHRASE : undefined);
|
(gpgPrivateKey ? DEFAULT_GPG_PASSPHRASE : undefined);
|
||||||
|
if (gpgPrivateKey) {
|
||||||
|
core.setSecret(gpgPrivateKey);
|
||||||
|
}
|
||||||
yield auth.configAuthentication(id, username, password, gpgPassphrase);
|
yield auth.configAuthentication(id, username, password, gpgPassphrase);
|
||||||
if (gpgPrivateKey) {
|
if (gpgPrivateKey) {
|
||||||
console.log('importing private key');
|
console.log('importing private key');
|
||||||
|
|
|
@ -12,9 +12,6 @@ const DEFAULT_GPG_PASSPHRASE = 'GPG_PASSPHRASE';
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
try {
|
try {
|
||||||
// Set secrets before use
|
|
||||||
core.setSecret('gpg-private-key');
|
|
||||||
|
|
||||||
let version = core.getInput('version');
|
let version = core.getInput('version');
|
||||||
if (!version) {
|
if (!version) {
|
||||||
version = core.getInput('java-version', {required: true});
|
version = core.getInput('java-version', {required: true});
|
||||||
|
@ -40,6 +37,10 @@ async function run() {
|
||||||
core.getInput('gpg-passphrase', {required: false}) ||
|
core.getInput('gpg-passphrase', {required: false}) ||
|
||||||
(gpgPrivateKey ? DEFAULT_GPG_PASSPHRASE : undefined);
|
(gpgPrivateKey ? DEFAULT_GPG_PASSPHRASE : undefined);
|
||||||
|
|
||||||
|
if (gpgPrivateKey) {
|
||||||
|
core.setSecret(gpgPrivateKey);
|
||||||
|
}
|
||||||
|
|
||||||
await auth.configAuthentication(id, username, password, gpgPassphrase);
|
await auth.configAuthentication(id, username, password, gpgPassphrase);
|
||||||
|
|
||||||
if (gpgPrivateKey) {
|
if (gpgPrivateKey) {
|
||||||
|
|
Loading…
Reference in a new issue