@@ -25645,6 +25645,28 @@ function range(n, m) {
2564525645exports.range = range;
2564625646//# sourceMappingURL=Set.js.map
2564725647
25648+ /***/ }),
25649+
25650+ /***/ 694:
25651+ /***/ (function(__unusedmodule, exports) {
25652+
25653+ "use strict";
25654+
25655+ Object.defineProperty(exports, "__esModule", { value: true });
25656+ exports.INPUT_VERSION = 'version';
25657+ exports.INPUT_JAVA_VERSION = 'java-version';
25658+ exports.INPUT_ARCHITECTURE = 'architecture';
25659+ exports.INPUT_JAVA_PACKAGE = 'java-package';
25660+ exports.INPUT_JDK_FILE = 'jdkFile';
25661+ exports.INPUT_SERVER_ID = 'server-id';
25662+ exports.INPUT_SERVER_USERNAME = 'server-username';
25663+ exports.INPUT_SERVER_PASSWORD = 'server-password';
25664+ exports.INPUT_GPG_PRIVATE_KEY = 'gpg-private-key';
25665+ exports.INPUT_GPG_PASSPHRASE = 'gpg-passphrase';
25666+ exports.INPUT_DEFAULT_GPG_PASSPHRASE = 'GPG_PASSPHRASE';
25667+ exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = 'gpg-private-key-fingerprint';
25668+
25669+
2564825670/***/ }),
2564925671
2565025672/***/ 695:
@@ -28650,40 +28672,46 @@ const core = __importStar(__webpack_require__(470));
2865028672const installer = __importStar(__webpack_require__(923));
2865128673const auth = __importStar(__webpack_require__(331));
2865228674const gpg = __importStar(__webpack_require__(884));
28675+ const constants = __importStar(__webpack_require__(694));
2865328676const path = __importStar(__webpack_require__(622));
28654- const DEFAULT_ID = 'github';
28655- const DEFAULT_USERNAME = 'GITHUB_ACTOR';
28656- const DEFAULT_PASSWORD = 'GITHUB_TOKEN';
28657- const DEFAULT_GPG_PRIVATE_KEY = undefined;
28658- const DEFAULT_GPG_PASSPHRASE = 'GPG_PASSPHRASE';
2865928677function run() {
2866028678 return __awaiter(this, void 0, void 0, function* () {
2866128679 try {
28662- let version = core.getInput('version' );
28680+ let version = core.getInput(constants.INPUT_VERSION );
2866328681 if (!version) {
28664- version = core.getInput('java-version' , { required: true });
28682+ version = core.getInput(constants.INPUT_JAVA_VERSION , { required: true });
2866528683 }
28666- const arch = core.getInput('architecture', { required: true });
28667- const javaPackage = core.getInput('java-package', { required: true });
28668- const jdkFile = core.getInput('jdkFile', { required: false }) || '';
28684+ const arch = core.getInput(constants.INPUT_ARCHITECTURE, { required: true });
28685+ const javaPackage = core.getInput(constants.INPUT_JAVA_PACKAGE, {
28686+ required: true
28687+ });
28688+ const jdkFile = core.getInput(constants.INPUT_JDK_FILE, { required: false });
2866928689 yield installer.getJava(version, arch, jdkFile, javaPackage);
2867028690 const matchersPath = path.join(__dirname, '..', '..', '.github');
28671- console.log(`##[add-matcher]${path.join(matchersPath, 'java.json')}`);
28672- const id = core.getInput('server-id', { required: false }) || DEFAULT_ID;
28673- const username = core.getInput('server-username', { required: false }) || DEFAULT_USERNAME;
28674- const password = core.getInput('server-password', { required: false }) || DEFAULT_PASSWORD;
28675- const gpgPrivateKey = core.getInput('gpg-private-key', { required: false }) ||
28676- DEFAULT_GPG_PRIVATE_KEY;
28677- const gpgPassphrase = core.getInput('gpg-passphrase', { required: false }) ||
28678- (gpgPrivateKey ? DEFAULT_GPG_PASSPHRASE : undefined);
28691+ core.info(`##[add-matcher]${path.join(matchersPath, 'java.json')}`);
28692+ const id = core.getInput(constants.INPUT_SERVER_ID, { required: false });
28693+ const username = core.getInput(constants.INPUT_SERVER_USERNAME, {
28694+ required: false
28695+ });
28696+ const password = core.getInput(constants.INPUT_SERVER_PASSWORD, {
28697+ required: false
28698+ });
28699+ const gpgPrivateKey = core.getInput(constants.INPUT_GPG_PRIVATE_KEY, {
28700+ required: false
28701+ });
28702+ const gpgPassphrase = core.getInput(constants.INPUT_GPG_PASSPHRASE, { required: false }) ||
28703+ (gpgPrivateKey ? constants.INPUT_DEFAULT_GPG_PASSPHRASE : undefined);
2867928704 if (gpgPrivateKey) {
2868028705 core.setSecret(gpgPrivateKey);
2868128706 }
28707+ if (gpgPassphrase) {
28708+ core.setSecret(gpgPassphrase);
28709+ }
2868228710 yield auth.configAuthentication(id, username, password, gpgPassphrase);
2868328711 if (gpgPrivateKey) {
28684- console.log ('importing private key');
28712+ core.info ('importing private key');
2868528713 const keyFingerprint = (yield gpg.importKey(gpgPrivateKey)) || '';
28686- core.saveState('gpg-private-key-fingerprint' , keyFingerprint);
28714+ core.saveState(constants.STATE_GPG_PRIVATE_KEY_FINGERPRINT , keyFingerprint);
2868728715 }
2868828716 }
2868928717 catch (error) {
0 commit comments