add support for dragonwell (#532)

* add support for dragonwell

* fix: update logic of parsing json file, refactor code

* build: rebuild action

* chore: update error message

* build: rebuild action

* tests: fix unit tests, add e2e tests

* chore: prettier, lint and rebuild solution

* feat: add check for the package type, update unit tests

* tests: update e2e tests

* tests: remove excess entries from e2e tests

* feat: update logic of getting json file

* feat: add logic for backuping getting json

* chore: update wordings

* chore: fix typos, add additional logs

* fix: fix review points

* chore: rebuild solution

* chore: update wordings

* chore: refactor code

---------

Co-authored-by: Ivan Zosimov <ivanzosimov@github.com>
Co-authored-by: Ivan <98037481+IvanZosimov@users.noreply.github.com>
This commit is contained in:
Accelerator1996
2023-09-20 19:22:11 +08:00
committed by GitHub
parent 4075bfc1b5
commit 0ab4596768
12 changed files with 1918 additions and 20 deletions

12
dist/cleanup/index.js vendored
View File

@ -67020,7 +67020,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.convertVersionToSemver = exports.getVersionFromFileContent = exports.isCacheFeatureAvailable = exports.isGhes = exports.isJobStatusSuccess = exports.getToolcachePath = exports.isVersionSatisfies = exports.getDownloadArchiveExtension = exports.extractJdkFile = exports.getVersionFromToolcachePath = exports.getBooleanInput = exports.getTempDir = void 0;
exports.getGitHubHttpHeaders = exports.convertVersionToSemver = exports.getVersionFromFileContent = exports.isCacheFeatureAvailable = exports.isGhes = exports.isJobStatusSuccess = exports.getToolcachePath = exports.isVersionSatisfies = exports.getDownloadArchiveExtension = exports.extractJdkFile = exports.getVersionFromToolcachePath = exports.getBooleanInput = exports.getTempDir = void 0;
const os_1 = __importDefault(__nccwpck_require__(2037));
const path_1 = __importDefault(__nccwpck_require__(1017));
const fs = __importStar(__nccwpck_require__(7147));
@ -67157,6 +67157,16 @@ function convertVersionToSemver(version) {
return mainVersion;
}
exports.convertVersionToSemver = convertVersionToSemver;
function getGitHubHttpHeaders() {
const token = core.getInput('token');
const auth = !token ? undefined : `token ${token}`;
const headers = {
authorization: auth,
accept: 'application/vnd.github.VERSION.raw'
};
return headers;
}
exports.getGitHubHttpHeaders = getGitHubHttpHeaders;
/***/ }),