Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f488cf82a | ||
|
|
372a8049d7 | ||
|
|
356b5a68f4 | ||
|
|
6d95698f76 | ||
|
|
c7293b6abd | ||
|
|
a13b7392fb | ||
|
|
7de2d094ec | ||
|
|
d7feb9d031 | ||
|
|
63e0340562 | ||
|
|
8ea6c1f538 | ||
|
|
01ed3ea8d4 | ||
|
|
e46a5025da | ||
|
|
4daf9d25d0 | ||
|
|
6249097607 | ||
|
|
99513f43da | ||
|
|
70cc29044a | ||
|
|
547a84f872 | ||
|
|
21af6a0ef7 | ||
|
|
1086d2a1b4 | ||
|
|
7f61f4917e | ||
|
|
f3662e4b72 | ||
|
|
b19c2851fd | ||
|
|
0027121302 | ||
|
|
0568ccefb6 | ||
|
|
a4c8415508 | ||
|
|
aef1f09405 | ||
|
|
26a86e7135 |
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -32,6 +32,8 @@ jobs:
|
||||
run: npm run lint
|
||||
- name: Test
|
||||
run: npm run test
|
||||
env:
|
||||
INPUT_GITHUB_TOKEN: ${{ github.token }} # for core.getInput()
|
||||
|
||||
test-action:
|
||||
name: GraalVM
|
||||
@@ -41,7 +43,7 @@ jobs:
|
||||
PASSES_GDS_TOKEN_CHECK: ${{ !matrix.set-gds-token || secrets.GDS_TOKEN != '' }}
|
||||
strategy:
|
||||
matrix:
|
||||
java-version: ['23', '21', '17', '20', 'dev']
|
||||
java-version: ['24', '21', '17', '20', 'dev']
|
||||
distribution: ['graalvm', 'graalvm-community']
|
||||
os: [
|
||||
ubuntu-latest, # Linux on Intel
|
||||
@@ -56,7 +58,7 @@ jobs:
|
||||
- java-version: 'latest-ea'
|
||||
distribution: 'graalvm'
|
||||
os: ubuntu-latest
|
||||
- java-version: '24-ea'
|
||||
- java-version: '25-ea'
|
||||
distribution: 'graalvm'
|
||||
os: ubuntu-latest
|
||||
- java-version: '21'
|
||||
@@ -131,7 +133,7 @@ jobs:
|
||||
- version: '22.2.0' # for update notifications
|
||||
java-version: '17'
|
||||
components: 'native-image'
|
||||
os: ubuntu-20.04
|
||||
os: ubuntu-22.04
|
||||
- version: '21.2.0'
|
||||
java-version: '8' # for JDK 8 notification
|
||||
components: 'native-image'
|
||||
|
||||
19
README.md
19
README.md
@@ -1,5 +1,7 @@
|
||||
# GitHub Action for GraalVM [](https://github.com/graalvm/setup-graalvm/actions/workflows/ci.yml)
|
||||
This GitHub action sets up [Oracle GraalVM][graalvm-medium], GraalVM [Community Edition (CE)][repo], [Enterprise Edition (EE)][graalvm-ee], [Mandrel][mandrel], or [Liberica Native Image Kit][liberica] as well as [Native Image][native-image] and GraalVM components such as [Truffle languages][truffle-languages].
|
||||
|
||||
Set up your GitHub Actions workflow with a specific [GraalVM][graalvm] distribution, and use it both as your JDK and for [ahead-of-time Native Image compilation][graalvm].
|
||||
|
||||
|
||||
## Key Features
|
||||
|
||||
@@ -7,12 +9,10 @@ This action:
|
||||
|
||||
- supports Oracle GraalVM [releases][graalvm-dl], [EA builds][ea-builds], GraalVM Community Edition (CE) [releases], [dev builds][dev-builds], GraalVM Enterprise Edition (EE) [releases][graalvm-ee] (set [`gds-token`](#options)) 22.1.0 and later, [Mandrel][mandrel], and [Liberica Native Image Kit][liberica] (see [Options](#options))
|
||||
- exports a `$GRAALVM_HOME` environment variable
|
||||
- adds `$GRAALVM_HOME/bin` to the `$PATH` environment variable<br>(Native Image, Truffle languages, and tools can be invoked directly)
|
||||
- adds `$GRAALVM_HOME/bin` to the `$PATH` environment variable<br>(`native-image`, `javac`, and other JDK tools can be invoked directly)
|
||||
- sets `$JAVA_HOME` to `$GRAALVM_HOME` by default<br>(can be disabled via `set-java-home: 'false'`, see [Options](#options))
|
||||
- supports `x64` and `aarch64` (selected automatically, `aarch64` requires a [self-hosted runner][gha-self-hosted-runners])
|
||||
- supports `x64` and `aarch64/arm64` (see how to use [Linux arm64 runners](https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/))
|
||||
- supports dependency caching for Apache Maven, Gradle, and sbt (see [`cache` option](#options))
|
||||
- sets up Windows environments with build tools using [vcvarsall.bat][vcvarsall]
|
||||
- has built-in support for GraalVM components and the [GraalVM Updater][gu]
|
||||
|
||||
|
||||
## Templates
|
||||
@@ -194,7 +194,7 @@ This actions can be configured with the following options:
|
||||
|
||||
| Name | Default | Description |
|
||||
|-----------------|:--------:|-------------|
|
||||
| `java-version`<br>*(required)* | n/a | Java version <ul><li>major versions: `'23'`, `'21'`, `'17'`, `'11'`, `'8'`</li><li>specific versions: `'21.0.3'`, `'17.0.11'`</li><li>early access (EA) builds: `'24-ea'` *(requires `distribution: 'graalvm'`)*</li><li>latest EA build: `'latest-ea'` *(requires `distribution: 'graalvm'`)*</li><li>dev builds: `'dev'`</li></ul> |
|
||||
| `java-version`<br>*(required)* | n/a | Java version <ul><li>major versions: `'24'`, `'21'`, `'17'`, `'11'`, `'8'`</li><li>specific versions: `'21.0.3'`, `'17.0.11'`</li><li>early access (EA) builds: `'25-ea'` *(requires `distribution: 'graalvm'`)*</li><li>latest EA build: `'latest-ea'` *(requires `distribution: 'graalvm'`)*</li><li>dev builds: `'dev'`</li></ul> |
|
||||
| `distribution` | `'graalvm'` | GraalVM distribution (see [supported distributions](#supported-distributions)) |
|
||||
| `java-package` | `'jdk'` | The package type (`'jdk'` or `'jdk+fx'`). Currently applies to Liberica only. |
|
||||
| `github-token` | `'${{ github.token }}'` | Token for communication with the GitHub API. Please set this to `${{ secrets.GITHUB_TOKEN }}` (see [templates](#templates)) to allow the action to authenticate with the GitHub API, which helps reduce rate-limiting issues. |
|
||||
@@ -270,21 +270,16 @@ Only pull requests from committers that can be verified as having signed the OCA
|
||||
[gha-self-hosted-runners]: https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners
|
||||
[gu]: https://www.graalvm.org/reference-manual/graalvm-updater/
|
||||
[graalvm]: https://www.graalvm.org/
|
||||
[graalvm-dl]: https://www.oracle.com/java/technologies/downloads/
|
||||
[graalvm-medium]: https://medium.com/graalvm/a-new-graalvm-release-and-new-free-license-4aab483692f5
|
||||
[graalvm-dl]: https://www.graalvm.org/downloads/
|
||||
[graalvm-ee]: https://www.oracle.com/downloads/graalvm-downloads.html
|
||||
[liberica]: https://bell-sw.com/liberica-native-image-kit/
|
||||
[mandrel]: https://github.com/graalvm/mandrel
|
||||
[mandrel-releases]: https://github.com/graalvm/mandrel/releases
|
||||
[mandrel-stable]: https://github.com/graalvm/mandrel/releases/latest
|
||||
[musl]: https://musl.libc.org/
|
||||
[native-image]: https://www.graalvm.org/native-image/
|
||||
[native-image-musl-build]: https://github.com/graalvm/setup-graalvm/blob/778131f1d6837ccd4b2e91382c31830896a2d56e/.github/workflows/test.yml#L74-L92
|
||||
[native-image-static]: https://github.com/oracle/graal/blob/fa6f4a974dedacf4688dcc430dd100849d9882f2/docs/reference-manual/native-image/StaticImages.md
|
||||
[oca]: https://oca.opensource.oracle.com
|
||||
[releases]: https://github.com/graalvm/graalvm-ce-builds/releases
|
||||
[repo]: https://github.com/oracle/graal
|
||||
[setup-java-caching]: https://github.com/actions/setup-java/tree/5b36705a13905facb447b6812d613a06a07e371d#caching-packages-dependencies
|
||||
[stable]: https://github.com/graalvm/graalvm-ce-builds/releases/latest
|
||||
[truffle-languages]: https://www.graalvm.org/reference-manual/languages/
|
||||
[vcvarsall]: https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line
|
||||
|
||||
353
dist/cleanup/index.js
generated
vendored
353
dist/cleanup/index.js
generated
vendored
@@ -220,7 +220,7 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
||||
};
|
||||
const response = yield twirpClient.GetCacheEntryDownloadURL(request);
|
||||
if (!response.ok) {
|
||||
core.debug(`Cache not found for keys: ${keys.join(', ')}`);
|
||||
core.debug(`Cache not found for version ${request.version} of keys: ${keys.join(', ')}`);
|
||||
return undefined;
|
||||
}
|
||||
core.info(`Cache hit for: ${request.key}`);
|
||||
@@ -2204,6 +2204,7 @@ const cacheUtils_1 = __nccwpck_require__(680);
|
||||
const auth_1 = __nccwpck_require__(4552);
|
||||
const http_client_1 = __nccwpck_require__(4844);
|
||||
const cache_twirp_client_1 = __nccwpck_require__(1486);
|
||||
const util_1 = __nccwpck_require__(7564);
|
||||
/**
|
||||
* This class is a wrapper around the CacheServiceClientJSON class generated by Twirp.
|
||||
*
|
||||
@@ -2263,6 +2264,7 @@ class CacheServiceClient {
|
||||
(0, core_1.debug)(`[Response] - ${response.message.statusCode}`);
|
||||
(0, core_1.debug)(`Headers: ${JSON.stringify(response.message.headers, null, 2)}`);
|
||||
const body = JSON.parse(rawBody);
|
||||
(0, util_1.maskSecretUrls)(body);
|
||||
(0, core_1.debug)(`Body: ${JSON.stringify(body, null, 2)}`);
|
||||
if (this.isSuccessStatusCode(statusCode)) {
|
||||
return { response, body };
|
||||
@@ -2444,6 +2446,87 @@ exports.getUserAgentString = getUserAgentString;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 7564:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.maskSecretUrls = exports.maskSigUrl = void 0;
|
||||
const core_1 = __nccwpck_require__(7484);
|
||||
/**
|
||||
* Masks the `sig` parameter in a URL and sets it as a secret.
|
||||
*
|
||||
* @param url - The URL containing the signature parameter to mask
|
||||
* @remarks
|
||||
* This function attempts to parse the provided URL and identify the 'sig' query parameter.
|
||||
* If found, it registers both the raw and URL-encoded signature values as secrets using
|
||||
* the Actions `setSecret` API, which prevents them from being displayed in logs.
|
||||
*
|
||||
* The function handles errors gracefully if URL parsing fails, logging them as debug messages.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* // Mask a signature in an Azure SAS token URL
|
||||
* maskSigUrl('https://example.blob.core.windows.net/container/file.txt?sig=abc123&se=2023-01-01');
|
||||
* ```
|
||||
*/
|
||||
function maskSigUrl(url) {
|
||||
if (!url)
|
||||
return;
|
||||
try {
|
||||
const parsedUrl = new URL(url);
|
||||
const signature = parsedUrl.searchParams.get('sig');
|
||||
if (signature) {
|
||||
(0, core_1.setSecret)(signature);
|
||||
(0, core_1.setSecret)(encodeURIComponent(signature));
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
(0, core_1.debug)(`Failed to parse URL: ${url} ${error instanceof Error ? error.message : String(error)}`);
|
||||
}
|
||||
}
|
||||
exports.maskSigUrl = maskSigUrl;
|
||||
/**
|
||||
* Masks sensitive information in URLs containing signature parameters.
|
||||
* Currently supports masking 'sig' parameters in the 'signed_upload_url'
|
||||
* and 'signed_download_url' properties of the provided object.
|
||||
*
|
||||
* @param body - The object should contain a signature
|
||||
* @remarks
|
||||
* This function extracts URLs from the object properties and calls maskSigUrl
|
||||
* on each one to redact sensitive signature information. The function doesn't
|
||||
* modify the original object; it only marks the signatures as secrets for
|
||||
* logging purposes.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* const responseBody = {
|
||||
* signed_upload_url: 'https://blob.core.windows.net/?sig=abc123',
|
||||
* signed_download_url: 'https://blob.core/windows.net/?sig=def456'
|
||||
* };
|
||||
* maskSecretUrls(responseBody);
|
||||
* ```
|
||||
*/
|
||||
function maskSecretUrls(body) {
|
||||
if (typeof body !== 'object' || body === null) {
|
||||
(0, core_1.debug)('body is not an object or is null');
|
||||
return;
|
||||
}
|
||||
if ('signed_upload_url' in body &&
|
||||
typeof body.signed_upload_url === 'string') {
|
||||
maskSigUrl(body.signed_upload_url);
|
||||
}
|
||||
if ('signed_download_url' in body &&
|
||||
typeof body.signed_download_url === 'string') {
|
||||
maskSigUrl(body.signed_download_url);
|
||||
}
|
||||
}
|
||||
exports.maskSecretUrls = maskSecretUrls;
|
||||
//# sourceMappingURL=util.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 5321:
|
||||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||||
|
||||
@@ -7615,6 +7698,7 @@ class Context {
|
||||
this.action = process.env.GITHUB_ACTION;
|
||||
this.actor = process.env.GITHUB_ACTOR;
|
||||
this.job = process.env.GITHUB_JOB;
|
||||
this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10);
|
||||
this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);
|
||||
this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);
|
||||
this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;
|
||||
@@ -47475,7 +47559,7 @@ function expand(str, isTop) {
|
||||
var isOptions = m.body.indexOf(',') >= 0;
|
||||
if (!isSequence && !isOptions) {
|
||||
// {a},b}
|
||||
if (m.post.match(/,.*\}/)) {
|
||||
if (m.post.match(/,(?!,).*\}/)) {
|
||||
str = m.pre + '{' + m.body + escClose + m.post;
|
||||
return expand(str);
|
||||
}
|
||||
@@ -47813,7 +47897,7 @@ function save(namespaces) {
|
||||
function load() {
|
||||
let r;
|
||||
try {
|
||||
r = exports.storage.getItem('debug');
|
||||
r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;
|
||||
} catch (error) {
|
||||
// Swallow
|
||||
// XXX (@Qix-) should we be logging these?
|
||||
@@ -48041,7 +48125,7 @@ function setup(env) {
|
||||
|
||||
const split = (typeof namespaces === 'string' ? namespaces : '')
|
||||
.trim()
|
||||
.replace(' ', ',')
|
||||
.replace(/\s+/g, ',')
|
||||
.split(',')
|
||||
.filter(Boolean);
|
||||
|
||||
@@ -52161,6 +52245,9 @@ function onceStrict (fn) {
|
||||
/***/ 9379:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const ANY = Symbol('SemVer ANY')
|
||||
// hoisted class for cyclic dependency
|
||||
class Comparator {
|
||||
@@ -52309,6 +52396,9 @@ const Range = __nccwpck_require__(6782)
|
||||
/***/ 6782:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SPACE_CHARACTERS = /\s+/g
|
||||
|
||||
// hoisted class for cyclic dependency
|
||||
@@ -52870,9 +52960,12 @@ const testSet = (set, version, options) => {
|
||||
/***/ 7163:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const debug = __nccwpck_require__(1159)
|
||||
const { MAX_LENGTH, MAX_SAFE_INTEGER } = __nccwpck_require__(5101)
|
||||
const { safeRe: re, safeSrc: src, t } = __nccwpck_require__(5471)
|
||||
const { safeRe: re, t } = __nccwpck_require__(5471)
|
||||
|
||||
const parseOptions = __nccwpck_require__(356)
|
||||
const { compareIdentifiers } = __nccwpck_require__(3348)
|
||||
@@ -53054,8 +53147,7 @@ class SemVer {
|
||||
}
|
||||
// Avoid an invalid semver results
|
||||
if (identifier) {
|
||||
const r = new RegExp(`^${this.options.loose ? src[t.PRERELEASELOOSE] : src[t.PRERELEASE]}$`)
|
||||
const match = `-${identifier}`.match(r)
|
||||
const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE])
|
||||
if (!match || match[1] !== identifier) {
|
||||
throw new Error(`invalid identifier: ${identifier}`)
|
||||
}
|
||||
@@ -53195,6 +53287,9 @@ module.exports = SemVer
|
||||
/***/ 1799:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const parse = __nccwpck_require__(6353)
|
||||
const clean = (version, options) => {
|
||||
const s = parse(version.trim().replace(/^[=v]+/, ''), options)
|
||||
@@ -53208,6 +53303,9 @@ module.exports = clean
|
||||
/***/ 8646:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const eq = __nccwpck_require__(5082)
|
||||
const neq = __nccwpck_require__(4974)
|
||||
const gt = __nccwpck_require__(6599)
|
||||
@@ -53267,6 +53365,9 @@ module.exports = cmp
|
||||
/***/ 5385:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
const parse = __nccwpck_require__(6353)
|
||||
const { safeRe: re, t } = __nccwpck_require__(5471)
|
||||
@@ -53334,6 +53435,9 @@ module.exports = coerce
|
||||
/***/ 7648:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
const compareBuild = (a, b, loose) => {
|
||||
const versionA = new SemVer(a, loose)
|
||||
@@ -53348,6 +53452,9 @@ module.exports = compareBuild
|
||||
/***/ 6874:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const compare = __nccwpck_require__(8469)
|
||||
const compareLoose = (a, b) => compare(a, b, true)
|
||||
module.exports = compareLoose
|
||||
@@ -53358,6 +53465,9 @@ module.exports = compareLoose
|
||||
/***/ 8469:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
const compare = (a, b, loose) =>
|
||||
new SemVer(a, loose).compare(new SemVer(b, loose))
|
||||
@@ -53370,6 +53480,9 @@ module.exports = compare
|
||||
/***/ 711:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const parse = __nccwpck_require__(6353)
|
||||
|
||||
const diff = (version1, version2) => {
|
||||
@@ -53435,6 +53548,9 @@ module.exports = diff
|
||||
/***/ 5082:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const compare = __nccwpck_require__(8469)
|
||||
const eq = (a, b, loose) => compare(a, b, loose) === 0
|
||||
module.exports = eq
|
||||
@@ -53445,6 +53561,9 @@ module.exports = eq
|
||||
/***/ 6599:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const compare = __nccwpck_require__(8469)
|
||||
const gt = (a, b, loose) => compare(a, b, loose) > 0
|
||||
module.exports = gt
|
||||
@@ -53455,6 +53574,9 @@ module.exports = gt
|
||||
/***/ 1236:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const compare = __nccwpck_require__(8469)
|
||||
const gte = (a, b, loose) => compare(a, b, loose) >= 0
|
||||
module.exports = gte
|
||||
@@ -53465,6 +53587,9 @@ module.exports = gte
|
||||
/***/ 2338:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
|
||||
const inc = (version, release, options, identifier, identifierBase) => {
|
||||
@@ -53491,6 +53616,9 @@ module.exports = inc
|
||||
/***/ 3872:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const compare = __nccwpck_require__(8469)
|
||||
const lt = (a, b, loose) => compare(a, b, loose) < 0
|
||||
module.exports = lt
|
||||
@@ -53501,6 +53629,9 @@ module.exports = lt
|
||||
/***/ 6717:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const compare = __nccwpck_require__(8469)
|
||||
const lte = (a, b, loose) => compare(a, b, loose) <= 0
|
||||
module.exports = lte
|
||||
@@ -53511,6 +53642,9 @@ module.exports = lte
|
||||
/***/ 8511:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
const major = (a, loose) => new SemVer(a, loose).major
|
||||
module.exports = major
|
||||
@@ -53521,6 +53655,9 @@ module.exports = major
|
||||
/***/ 2603:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
const minor = (a, loose) => new SemVer(a, loose).minor
|
||||
module.exports = minor
|
||||
@@ -53531,6 +53668,9 @@ module.exports = minor
|
||||
/***/ 4974:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const compare = __nccwpck_require__(8469)
|
||||
const neq = (a, b, loose) => compare(a, b, loose) !== 0
|
||||
module.exports = neq
|
||||
@@ -53541,6 +53681,9 @@ module.exports = neq
|
||||
/***/ 6353:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
const parse = (version, options, throwErrors = false) => {
|
||||
if (version instanceof SemVer) {
|
||||
@@ -53564,6 +53707,9 @@ module.exports = parse
|
||||
/***/ 6375:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
const patch = (a, loose) => new SemVer(a, loose).patch
|
||||
module.exports = patch
|
||||
@@ -53574,6 +53720,9 @@ module.exports = patch
|
||||
/***/ 5714:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const parse = __nccwpck_require__(6353)
|
||||
const prerelease = (version, options) => {
|
||||
const parsed = parse(version, options)
|
||||
@@ -53587,6 +53736,9 @@ module.exports = prerelease
|
||||
/***/ 2173:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const compare = __nccwpck_require__(8469)
|
||||
const rcompare = (a, b, loose) => compare(b, a, loose)
|
||||
module.exports = rcompare
|
||||
@@ -53597,6 +53749,9 @@ module.exports = rcompare
|
||||
/***/ 7192:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const compareBuild = __nccwpck_require__(7648)
|
||||
const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))
|
||||
module.exports = rsort
|
||||
@@ -53607,6 +53762,9 @@ module.exports = rsort
|
||||
/***/ 8011:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const Range = __nccwpck_require__(6782)
|
||||
const satisfies = (version, range, options) => {
|
||||
try {
|
||||
@@ -53624,6 +53782,9 @@ module.exports = satisfies
|
||||
/***/ 9872:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const compareBuild = __nccwpck_require__(7648)
|
||||
const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))
|
||||
module.exports = sort
|
||||
@@ -53634,6 +53795,9 @@ module.exports = sort
|
||||
/***/ 8780:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const parse = __nccwpck_require__(6353)
|
||||
const valid = (version, options) => {
|
||||
const v = parse(version, options)
|
||||
@@ -53647,6 +53811,9 @@ module.exports = valid
|
||||
/***/ 2088:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
// just pre-load all the stuff that index.js lazily exports
|
||||
const internalRe = __nccwpck_require__(5471)
|
||||
const constants = __nccwpck_require__(5101)
|
||||
@@ -53743,6 +53910,9 @@ module.exports = {
|
||||
/***/ 5101:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
// Note: this is the semver.org version of the spec that it implements
|
||||
// Not necessarily the package version of this code.
|
||||
const SEMVER_SPEC_VERSION = '2.0.0'
|
||||
@@ -53785,6 +53955,9 @@ module.exports = {
|
||||
/***/ 1159:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const debug = (
|
||||
typeof process === 'object' &&
|
||||
process.env &&
|
||||
@@ -53801,6 +53974,9 @@ module.exports = debug
|
||||
/***/ 3348:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const numeric = /^[0-9]+$/
|
||||
const compareIdentifiers = (a, b) => {
|
||||
const anum = numeric.test(a)
|
||||
@@ -53831,6 +54007,9 @@ module.exports = {
|
||||
/***/ 1383:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
class LRUCache {
|
||||
constructor () {
|
||||
this.max = 1000
|
||||
@@ -53878,6 +54057,9 @@ module.exports = LRUCache
|
||||
/***/ 356:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
// parse out just the options we care about
|
||||
const looseOption = Object.freeze({ loose: true })
|
||||
const emptyOpts = Object.freeze({ })
|
||||
@@ -53900,6 +54082,9 @@ module.exports = parseOptions
|
||||
/***/ 5471:
|
||||
/***/ ((module, exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const {
|
||||
MAX_SAFE_COMPONENT_LENGTH,
|
||||
MAX_SAFE_BUILD_LENGTH,
|
||||
@@ -53978,12 +54163,14 @@ createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
|
||||
|
||||
// ## Pre-release Version Identifier
|
||||
// A numeric identifier, or a non-numeric identifier.
|
||||
// Non-numberic identifiers include numberic identifiers but can be longer.
|
||||
// Therefore non-numberic identifiers must go first.
|
||||
|
||||
createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]
|
||||
}|${src[t.NONNUMERICIDENTIFIER]})`)
|
||||
createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]
|
||||
}|${src[t.NUMERICIDENTIFIER]})`)
|
||||
|
||||
createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]
|
||||
}|${src[t.NONNUMERICIDENTIFIER]})`)
|
||||
createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER]
|
||||
}|${src[t.NUMERICIDENTIFIERLOOSE]})`)
|
||||
|
||||
// ## Pre-release Version
|
||||
// Hyphen, followed by one or more dot-separated pre-release version
|
||||
@@ -54126,6 +54313,9 @@ createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$')
|
||||
/***/ 2276:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
// Determine if version is greater than all the versions possible in the range.
|
||||
const outside = __nccwpck_require__(280)
|
||||
const gtr = (version, range, options) => outside(version, range, '>', options)
|
||||
@@ -54137,6 +54327,9 @@ module.exports = gtr
|
||||
/***/ 3465:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const Range = __nccwpck_require__(6782)
|
||||
const intersects = (r1, r2, options) => {
|
||||
r1 = new Range(r1, options)
|
||||
@@ -54151,6 +54344,9 @@ module.exports = intersects
|
||||
/***/ 5213:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const outside = __nccwpck_require__(280)
|
||||
// Determine if version is less than all the versions possible in the range
|
||||
const ltr = (version, range, options) => outside(version, range, '<', options)
|
||||
@@ -54162,6 +54358,9 @@ module.exports = ltr
|
||||
/***/ 5574:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
const Range = __nccwpck_require__(6782)
|
||||
|
||||
@@ -54194,6 +54393,9 @@ module.exports = maxSatisfying
|
||||
/***/ 8595:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
const Range = __nccwpck_require__(6782)
|
||||
const minSatisfying = (versions, range, options) => {
|
||||
@@ -54225,6 +54427,9 @@ module.exports = minSatisfying
|
||||
/***/ 1866:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
const Range = __nccwpck_require__(6782)
|
||||
const gt = __nccwpck_require__(6599)
|
||||
@@ -54293,6 +54498,9 @@ module.exports = minVersion
|
||||
/***/ 280:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
const Comparator = __nccwpck_require__(9379)
|
||||
const { ANY } = Comparator
|
||||
@@ -54380,6 +54588,9 @@ module.exports = outside
|
||||
/***/ 2028:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
// given a set of versions and a range, create a "simplified" range
|
||||
// that includes the same versions that the original range does
|
||||
// If the original range is shorter than the simplified one, return that.
|
||||
@@ -54434,6 +54645,9 @@ module.exports = (versions, range, options) => {
|
||||
/***/ 1489:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const Range = __nccwpck_require__(6782)
|
||||
const Comparator = __nccwpck_require__(9379)
|
||||
const { ANY } = Comparator
|
||||
@@ -54688,6 +54902,9 @@ module.exports = subset
|
||||
/***/ 4750:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const Range = __nccwpck_require__(6782)
|
||||
|
||||
// Mostly just for testing and legacy API reasons
|
||||
@@ -54703,6 +54920,9 @@ module.exports = toComparators
|
||||
/***/ 4737:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const Range = __nccwpck_require__(6782)
|
||||
const validRange = (range, options) => {
|
||||
try {
|
||||
@@ -61044,7 +61264,7 @@ module.exports = {
|
||||
|
||||
|
||||
const { parseSetCookie } = __nccwpck_require__(8915)
|
||||
const { stringify, getHeadersList } = __nccwpck_require__(3834)
|
||||
const { stringify } = __nccwpck_require__(3834)
|
||||
const { webidl } = __nccwpck_require__(4222)
|
||||
const { Headers } = __nccwpck_require__(6349)
|
||||
|
||||
@@ -61120,14 +61340,13 @@ function getSetCookies (headers) {
|
||||
|
||||
webidl.brandCheck(headers, Headers, { strict: false })
|
||||
|
||||
const cookies = getHeadersList(headers).cookies
|
||||
const cookies = headers.getSetCookie()
|
||||
|
||||
if (!cookies) {
|
||||
return []
|
||||
}
|
||||
|
||||
// In older versions of undici, cookies is a list of name:value.
|
||||
return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
|
||||
return cookies.map((pair) => parseSetCookie(pair))
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -61555,14 +61774,15 @@ module.exports = {
|
||||
/***/ }),
|
||||
|
||||
/***/ 3834:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const assert = __nccwpck_require__(2613)
|
||||
const { kHeadersList } = __nccwpck_require__(6443)
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function isCTLExcludingHtab (value) {
|
||||
if (value.length === 0) {
|
||||
return false
|
||||
@@ -61823,31 +62043,13 @@ function stringify (cookie) {
|
||||
return out.join('; ')
|
||||
}
|
||||
|
||||
let kHeadersListNode
|
||||
|
||||
function getHeadersList (headers) {
|
||||
if (headers[kHeadersList]) {
|
||||
return headers[kHeadersList]
|
||||
}
|
||||
|
||||
if (!kHeadersListNode) {
|
||||
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
|
||||
(symbol) => symbol.description === 'headers list'
|
||||
)
|
||||
|
||||
assert(kHeadersListNode, 'Headers cannot be parsed')
|
||||
}
|
||||
|
||||
const headersList = headers[kHeadersListNode]
|
||||
assert(headersList)
|
||||
|
||||
return headersList
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
isCTLExcludingHtab,
|
||||
stringify,
|
||||
getHeadersList
|
||||
validateCookieName,
|
||||
validateCookiePath,
|
||||
validateCookieValue,
|
||||
toIMFDate,
|
||||
stringify
|
||||
}
|
||||
|
||||
|
||||
@@ -65851,6 +66053,7 @@ const {
|
||||
isValidHeaderName,
|
||||
isValidHeaderValue
|
||||
} = __nccwpck_require__(5523)
|
||||
const util = __nccwpck_require__(9023)
|
||||
const { webidl } = __nccwpck_require__(4222)
|
||||
const assert = __nccwpck_require__(2613)
|
||||
|
||||
@@ -66404,6 +66607,9 @@ Object.defineProperties(Headers.prototype, {
|
||||
[Symbol.toStringTag]: {
|
||||
value: 'Headers',
|
||||
configurable: true
|
||||
},
|
||||
[util.inspect.custom]: {
|
||||
enumerable: false
|
||||
}
|
||||
})
|
||||
|
||||
@@ -75580,6 +75786,20 @@ class Pool extends PoolBase {
|
||||
? { ...options.interceptors }
|
||||
: undefined
|
||||
this[kFactory] = factory
|
||||
|
||||
this.on('connectionError', (origin, targets, error) => {
|
||||
// If a connection error occurs, we remove the client from the pool,
|
||||
// and emit a connectionError event. They will not be re-used.
|
||||
// Fixes https://github.com/nodejs/undici/issues/3895
|
||||
for (const target of targets) {
|
||||
// Do not use kRemoveClient here, as it will close the client,
|
||||
// but the client cannot be closed in this state.
|
||||
const idx = this[kClients].indexOf(target)
|
||||
if (idx !== -1) {
|
||||
this[kClients].splice(idx, 1)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
[kGetDispatcher] () {
|
||||
@@ -78061,7 +78281,7 @@ run();
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.ERROR_HINT = exports.ERROR_REQUEST = exports.EVENT_NAME_PULL_REQUEST = exports.ENV_GITHUB_EVENT_NAME = exports.GDS_GRAALVM_PRODUCT_ID = exports.GDS_BASE = exports.MANDREL_NAMESPACE = exports.GRAALVM_RELEASES_REPO = exports.GRAALVM_PLATFORM = exports.GRAALVM_GH_USER = exports.GRAALVM_FILE_EXTENSION = exports.GRAALVM_ARCH = exports.JDK_HOME_SUFFIX = exports.JDK_PLATFORM = exports.JDK_ARCH = exports.VERSION_LATEST = exports.VERSION_DEV = exports.DISTRIBUTION_LIBERICA = exports.DISTRIBUTION_MANDREL = exports.DISTRIBUTION_GRAALVM_COMMUNITY = exports.DISTRIBUTION_GRAALVM = exports.EXECUTABLE_SUFFIX = exports.IS_WINDOWS = exports.IS_MACOS = exports.IS_LINUX = exports.NATIVE_IMAGE_OPTIONS_ENV = exports.INPUT_NI_MUSL = exports.INPUT_CHECK_FOR_UPDATES = exports.INPUT_CACHE = exports.INPUT_SET_JAVA_HOME = exports.INPUT_GITHUB_TOKEN = exports.INPUT_COMPONENTS = exports.INPUT_DISTRIBUTION = exports.INPUT_JAVA_PACKAGE = exports.INPUT_JAVA_VERSION = exports.INPUT_GDS_TOKEN = exports.INPUT_VERSION = exports.ACTION_VERSION = void 0;
|
||||
exports.ACTION_VERSION = '1.3.3';
|
||||
exports.ACTION_VERSION = '1.3.5';
|
||||
exports.INPUT_VERSION = 'version';
|
||||
exports.INPUT_GDS_TOKEN = 'gds-token';
|
||||
exports.INPUT_JAVA_VERSION = 'java-version';
|
||||
@@ -78970,24 +79190,15 @@ exports.setNativeImageOption = setNativeImageOption;
|
||||
const c = __importStar(__nccwpck_require__(7242));
|
||||
const core = __importStar(__nccwpck_require__(7484));
|
||||
const github = __importStar(__nccwpck_require__(3228));
|
||||
const httpClient = __importStar(__nccwpck_require__(4844));
|
||||
const semver = __importStar(__nccwpck_require__(2088));
|
||||
const tc = __importStar(__nccwpck_require__(3472));
|
||||
const fs = __importStar(__nccwpck_require__(9896));
|
||||
const exec_1 = __nccwpck_require__(5236);
|
||||
const fs_1 = __nccwpck_require__(9896);
|
||||
const core_1 = __nccwpck_require__(1897);
|
||||
const crypto_1 = __nccwpck_require__(6982);
|
||||
const path_1 = __nccwpck_require__(6928);
|
||||
const os_1 = __nccwpck_require__(857);
|
||||
// Set up Octokit for github.com only and in the same way as @actions/github (see https://git.io/Jy9YP)
|
||||
const baseUrl = 'https://api.github.com';
|
||||
const GitHubDotCom = core_1.Octokit.defaults({
|
||||
baseUrl,
|
||||
request: {
|
||||
agent: new httpClient.HttpClient().getAgent(baseUrl)
|
||||
}
|
||||
});
|
||||
const utils_1 = __nccwpck_require__(8006);
|
||||
async function exec(commandLine, args, options) {
|
||||
const exitCode = await (0, exec_1.exec)(commandLine, args, options);
|
||||
if (exitCode !== 0) {
|
||||
@@ -78995,18 +79206,14 @@ async function exec(commandLine, args, options) {
|
||||
}
|
||||
}
|
||||
async function getLatestRelease(repo) {
|
||||
const githubToken = getGitHubToken();
|
||||
const options = githubToken.length > 0 ? { auth: githubToken } : {};
|
||||
const octokit = new GitHubDotCom(options);
|
||||
const octokit = getOctokit();
|
||||
return (await octokit.request('GET /repos/{owner}/{repo}/releases/latest', {
|
||||
owner: c.GRAALVM_GH_USER,
|
||||
repo
|
||||
})).data;
|
||||
}
|
||||
async function getContents(repo, path) {
|
||||
const githubToken = getGitHubToken();
|
||||
const options = githubToken.length > 0 ? { auth: githubToken } : {};
|
||||
const octokit = new GitHubDotCom(options);
|
||||
const octokit = getOctokit();
|
||||
return (await octokit.request('GET /repos/{owner}/{repo}/contents/{path}', {
|
||||
owner: c.GRAALVM_GH_USER,
|
||||
repo,
|
||||
@@ -79014,9 +79221,7 @@ async function getContents(repo, path) {
|
||||
})).data;
|
||||
}
|
||||
async function getTaggedRelease(owner, repo, tag) {
|
||||
const githubToken = getGitHubToken();
|
||||
const options = githubToken.length > 0 ? { auth: githubToken } : {};
|
||||
const octokit = new GitHubDotCom(options);
|
||||
const octokit = getOctokit();
|
||||
return (await octokit.request('GET /repos/{owner}/{repo}/releases/tags/{tag}', {
|
||||
owner,
|
||||
repo,
|
||||
@@ -79024,9 +79229,7 @@ async function getTaggedRelease(owner, repo, tag) {
|
||||
})).data;
|
||||
}
|
||||
async function getMatchingTags(owner, repo, tagPrefix) {
|
||||
const githubToken = getGitHubToken();
|
||||
const options = githubToken.length > 0 ? { auth: githubToken } : {};
|
||||
const octokit = new GitHubDotCom(options);
|
||||
const octokit = getOctokit();
|
||||
return (await octokit.request('GET /repos/{owner}/{repo}/git/matching-refs/tags/{tagPrefix}', {
|
||||
owner,
|
||||
repo,
|
||||
@@ -79094,15 +79297,23 @@ function toSemVer(version) {
|
||||
function isPREvent() {
|
||||
return process.env[c.ENV_GITHUB_EVENT_NAME] === c.EVENT_NAME_PULL_REQUEST;
|
||||
}
|
||||
function getGitHubToken() {
|
||||
return core.getInput(c.INPUT_GITHUB_TOKEN);
|
||||
function getOctokit() {
|
||||
/* Set up GitHub instance manually because @actions/github does not allow unauthenticated access */
|
||||
const GitHubWithPlugins = utils_1.GitHub.plugin();
|
||||
const token = core.getInput(c.INPUT_GITHUB_TOKEN);
|
||||
if (token) {
|
||||
return new GitHubWithPlugins({ auth: `token ${token}` });
|
||||
}
|
||||
else {
|
||||
return new GitHubWithPlugins(); /* unauthenticated */
|
||||
}
|
||||
}
|
||||
async function findExistingPRCommentId(bodyStartsWith) {
|
||||
if (!isPREvent()) {
|
||||
throw new Error('Not a PR event.');
|
||||
}
|
||||
const context = github.context;
|
||||
const octokit = github.getOctokit(getGitHubToken());
|
||||
const octokit = getOctokit();
|
||||
try {
|
||||
const comments = await octokit.paginate(octokit.rest.issues.listComments, {
|
||||
...context.repo,
|
||||
@@ -79122,7 +79333,7 @@ async function updatePRComment(content, commentId) {
|
||||
throw new Error('Not a PR event.');
|
||||
}
|
||||
try {
|
||||
await github.getOctokit(getGitHubToken()).rest.issues.updateComment({
|
||||
await getOctokit().rest.issues.updateComment({
|
||||
...github.context.repo,
|
||||
comment_id: commentId,
|
||||
body: content
|
||||
@@ -79138,7 +79349,7 @@ async function createPRComment(content) {
|
||||
}
|
||||
const context = github.context;
|
||||
try {
|
||||
await github.getOctokit(getGitHubToken()).rest.issues.createComment({
|
||||
await getOctokit().rest.issues.createComment({
|
||||
...context.repo,
|
||||
issue_number: context.payload.pull_request?.number,
|
||||
body: content
|
||||
@@ -90396,7 +90607,7 @@ module.exports = parseParams
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"4.0.2","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","@protobuf-ts/plugin":"^2.9.4","semver":"^6.3.1"},"devDependencies":{"@types/semver":"^6.0.0","typescript":"^5.2.2"}}');
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"4.0.3","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","@protobuf-ts/plugin":"^2.9.4","semver":"^6.3.1"},"devDependencies":{"@types/node":"^22.13.9","@types/semver":"^6.0.0","typescript":"^5.2.2"}}');
|
||||
|
||||
/***/ })
|
||||
|
||||
|
||||
353
dist/main/index.js
generated
vendored
353
dist/main/index.js
generated
vendored
@@ -220,7 +220,7 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
||||
};
|
||||
const response = yield twirpClient.GetCacheEntryDownloadURL(request);
|
||||
if (!response.ok) {
|
||||
core.debug(`Cache not found for keys: ${keys.join(', ')}`);
|
||||
core.debug(`Cache not found for version ${request.version} of keys: ${keys.join(', ')}`);
|
||||
return undefined;
|
||||
}
|
||||
core.info(`Cache hit for: ${request.key}`);
|
||||
@@ -2204,6 +2204,7 @@ const cacheUtils_1 = __nccwpck_require__(680);
|
||||
const auth_1 = __nccwpck_require__(4552);
|
||||
const http_client_1 = __nccwpck_require__(4844);
|
||||
const cache_twirp_client_1 = __nccwpck_require__(1486);
|
||||
const util_1 = __nccwpck_require__(7564);
|
||||
/**
|
||||
* This class is a wrapper around the CacheServiceClientJSON class generated by Twirp.
|
||||
*
|
||||
@@ -2263,6 +2264,7 @@ class CacheServiceClient {
|
||||
(0, core_1.debug)(`[Response] - ${response.message.statusCode}`);
|
||||
(0, core_1.debug)(`Headers: ${JSON.stringify(response.message.headers, null, 2)}`);
|
||||
const body = JSON.parse(rawBody);
|
||||
(0, util_1.maskSecretUrls)(body);
|
||||
(0, core_1.debug)(`Body: ${JSON.stringify(body, null, 2)}`);
|
||||
if (this.isSuccessStatusCode(statusCode)) {
|
||||
return { response, body };
|
||||
@@ -2444,6 +2446,87 @@ exports.getUserAgentString = getUserAgentString;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 7564:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.maskSecretUrls = exports.maskSigUrl = void 0;
|
||||
const core_1 = __nccwpck_require__(7484);
|
||||
/**
|
||||
* Masks the `sig` parameter in a URL and sets it as a secret.
|
||||
*
|
||||
* @param url - The URL containing the signature parameter to mask
|
||||
* @remarks
|
||||
* This function attempts to parse the provided URL and identify the 'sig' query parameter.
|
||||
* If found, it registers both the raw and URL-encoded signature values as secrets using
|
||||
* the Actions `setSecret` API, which prevents them from being displayed in logs.
|
||||
*
|
||||
* The function handles errors gracefully if URL parsing fails, logging them as debug messages.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* // Mask a signature in an Azure SAS token URL
|
||||
* maskSigUrl('https://example.blob.core.windows.net/container/file.txt?sig=abc123&se=2023-01-01');
|
||||
* ```
|
||||
*/
|
||||
function maskSigUrl(url) {
|
||||
if (!url)
|
||||
return;
|
||||
try {
|
||||
const parsedUrl = new URL(url);
|
||||
const signature = parsedUrl.searchParams.get('sig');
|
||||
if (signature) {
|
||||
(0, core_1.setSecret)(signature);
|
||||
(0, core_1.setSecret)(encodeURIComponent(signature));
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
(0, core_1.debug)(`Failed to parse URL: ${url} ${error instanceof Error ? error.message : String(error)}`);
|
||||
}
|
||||
}
|
||||
exports.maskSigUrl = maskSigUrl;
|
||||
/**
|
||||
* Masks sensitive information in URLs containing signature parameters.
|
||||
* Currently supports masking 'sig' parameters in the 'signed_upload_url'
|
||||
* and 'signed_download_url' properties of the provided object.
|
||||
*
|
||||
* @param body - The object should contain a signature
|
||||
* @remarks
|
||||
* This function extracts URLs from the object properties and calls maskSigUrl
|
||||
* on each one to redact sensitive signature information. The function doesn't
|
||||
* modify the original object; it only marks the signatures as secrets for
|
||||
* logging purposes.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* const responseBody = {
|
||||
* signed_upload_url: 'https://blob.core.windows.net/?sig=abc123',
|
||||
* signed_download_url: 'https://blob.core/windows.net/?sig=def456'
|
||||
* };
|
||||
* maskSecretUrls(responseBody);
|
||||
* ```
|
||||
*/
|
||||
function maskSecretUrls(body) {
|
||||
if (typeof body !== 'object' || body === null) {
|
||||
(0, core_1.debug)('body is not an object or is null');
|
||||
return;
|
||||
}
|
||||
if ('signed_upload_url' in body &&
|
||||
typeof body.signed_upload_url === 'string') {
|
||||
maskSigUrl(body.signed_upload_url);
|
||||
}
|
||||
if ('signed_download_url' in body &&
|
||||
typeof body.signed_download_url === 'string') {
|
||||
maskSigUrl(body.signed_download_url);
|
||||
}
|
||||
}
|
||||
exports.maskSecretUrls = maskSecretUrls;
|
||||
//# sourceMappingURL=util.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 5321:
|
||||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||||
|
||||
@@ -7615,6 +7698,7 @@ class Context {
|
||||
this.action = process.env.GITHUB_ACTION;
|
||||
this.actor = process.env.GITHUB_ACTOR;
|
||||
this.job = process.env.GITHUB_JOB;
|
||||
this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10);
|
||||
this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);
|
||||
this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);
|
||||
this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;
|
||||
@@ -47475,7 +47559,7 @@ function expand(str, isTop) {
|
||||
var isOptions = m.body.indexOf(',') >= 0;
|
||||
if (!isSequence && !isOptions) {
|
||||
// {a},b}
|
||||
if (m.post.match(/,.*\}/)) {
|
||||
if (m.post.match(/,(?!,).*\}/)) {
|
||||
str = m.pre + '{' + m.body + escClose + m.post;
|
||||
return expand(str);
|
||||
}
|
||||
@@ -47813,7 +47897,7 @@ function save(namespaces) {
|
||||
function load() {
|
||||
let r;
|
||||
try {
|
||||
r = exports.storage.getItem('debug');
|
||||
r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;
|
||||
} catch (error) {
|
||||
// Swallow
|
||||
// XXX (@Qix-) should we be logging these?
|
||||
@@ -48041,7 +48125,7 @@ function setup(env) {
|
||||
|
||||
const split = (typeof namespaces === 'string' ? namespaces : '')
|
||||
.trim()
|
||||
.replace(' ', ',')
|
||||
.replace(/\s+/g, ',')
|
||||
.split(',')
|
||||
.filter(Boolean);
|
||||
|
||||
@@ -52161,6 +52245,9 @@ function onceStrict (fn) {
|
||||
/***/ 9379:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const ANY = Symbol('SemVer ANY')
|
||||
// hoisted class for cyclic dependency
|
||||
class Comparator {
|
||||
@@ -52309,6 +52396,9 @@ const Range = __nccwpck_require__(6782)
|
||||
/***/ 6782:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SPACE_CHARACTERS = /\s+/g
|
||||
|
||||
// hoisted class for cyclic dependency
|
||||
@@ -52870,9 +52960,12 @@ const testSet = (set, version, options) => {
|
||||
/***/ 7163:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const debug = __nccwpck_require__(1159)
|
||||
const { MAX_LENGTH, MAX_SAFE_INTEGER } = __nccwpck_require__(5101)
|
||||
const { safeRe: re, safeSrc: src, t } = __nccwpck_require__(5471)
|
||||
const { safeRe: re, t } = __nccwpck_require__(5471)
|
||||
|
||||
const parseOptions = __nccwpck_require__(356)
|
||||
const { compareIdentifiers } = __nccwpck_require__(3348)
|
||||
@@ -53054,8 +53147,7 @@ class SemVer {
|
||||
}
|
||||
// Avoid an invalid semver results
|
||||
if (identifier) {
|
||||
const r = new RegExp(`^${this.options.loose ? src[t.PRERELEASELOOSE] : src[t.PRERELEASE]}$`)
|
||||
const match = `-${identifier}`.match(r)
|
||||
const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE])
|
||||
if (!match || match[1] !== identifier) {
|
||||
throw new Error(`invalid identifier: ${identifier}`)
|
||||
}
|
||||
@@ -53195,6 +53287,9 @@ module.exports = SemVer
|
||||
/***/ 1799:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const parse = __nccwpck_require__(6353)
|
||||
const clean = (version, options) => {
|
||||
const s = parse(version.trim().replace(/^[=v]+/, ''), options)
|
||||
@@ -53208,6 +53303,9 @@ module.exports = clean
|
||||
/***/ 8646:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const eq = __nccwpck_require__(5082)
|
||||
const neq = __nccwpck_require__(4974)
|
||||
const gt = __nccwpck_require__(6599)
|
||||
@@ -53267,6 +53365,9 @@ module.exports = cmp
|
||||
/***/ 5385:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
const parse = __nccwpck_require__(6353)
|
||||
const { safeRe: re, t } = __nccwpck_require__(5471)
|
||||
@@ -53334,6 +53435,9 @@ module.exports = coerce
|
||||
/***/ 7648:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
const compareBuild = (a, b, loose) => {
|
||||
const versionA = new SemVer(a, loose)
|
||||
@@ -53348,6 +53452,9 @@ module.exports = compareBuild
|
||||
/***/ 6874:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const compare = __nccwpck_require__(8469)
|
||||
const compareLoose = (a, b) => compare(a, b, true)
|
||||
module.exports = compareLoose
|
||||
@@ -53358,6 +53465,9 @@ module.exports = compareLoose
|
||||
/***/ 8469:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
const compare = (a, b, loose) =>
|
||||
new SemVer(a, loose).compare(new SemVer(b, loose))
|
||||
@@ -53370,6 +53480,9 @@ module.exports = compare
|
||||
/***/ 711:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const parse = __nccwpck_require__(6353)
|
||||
|
||||
const diff = (version1, version2) => {
|
||||
@@ -53435,6 +53548,9 @@ module.exports = diff
|
||||
/***/ 5082:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const compare = __nccwpck_require__(8469)
|
||||
const eq = (a, b, loose) => compare(a, b, loose) === 0
|
||||
module.exports = eq
|
||||
@@ -53445,6 +53561,9 @@ module.exports = eq
|
||||
/***/ 6599:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const compare = __nccwpck_require__(8469)
|
||||
const gt = (a, b, loose) => compare(a, b, loose) > 0
|
||||
module.exports = gt
|
||||
@@ -53455,6 +53574,9 @@ module.exports = gt
|
||||
/***/ 1236:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const compare = __nccwpck_require__(8469)
|
||||
const gte = (a, b, loose) => compare(a, b, loose) >= 0
|
||||
module.exports = gte
|
||||
@@ -53465,6 +53587,9 @@ module.exports = gte
|
||||
/***/ 2338:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
|
||||
const inc = (version, release, options, identifier, identifierBase) => {
|
||||
@@ -53491,6 +53616,9 @@ module.exports = inc
|
||||
/***/ 3872:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const compare = __nccwpck_require__(8469)
|
||||
const lt = (a, b, loose) => compare(a, b, loose) < 0
|
||||
module.exports = lt
|
||||
@@ -53501,6 +53629,9 @@ module.exports = lt
|
||||
/***/ 6717:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const compare = __nccwpck_require__(8469)
|
||||
const lte = (a, b, loose) => compare(a, b, loose) <= 0
|
||||
module.exports = lte
|
||||
@@ -53511,6 +53642,9 @@ module.exports = lte
|
||||
/***/ 8511:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
const major = (a, loose) => new SemVer(a, loose).major
|
||||
module.exports = major
|
||||
@@ -53521,6 +53655,9 @@ module.exports = major
|
||||
/***/ 2603:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
const minor = (a, loose) => new SemVer(a, loose).minor
|
||||
module.exports = minor
|
||||
@@ -53531,6 +53668,9 @@ module.exports = minor
|
||||
/***/ 4974:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const compare = __nccwpck_require__(8469)
|
||||
const neq = (a, b, loose) => compare(a, b, loose) !== 0
|
||||
module.exports = neq
|
||||
@@ -53541,6 +53681,9 @@ module.exports = neq
|
||||
/***/ 6353:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
const parse = (version, options, throwErrors = false) => {
|
||||
if (version instanceof SemVer) {
|
||||
@@ -53564,6 +53707,9 @@ module.exports = parse
|
||||
/***/ 8756:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
const patch = (a, loose) => new SemVer(a, loose).patch
|
||||
module.exports = patch
|
||||
@@ -53574,6 +53720,9 @@ module.exports = patch
|
||||
/***/ 5714:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const parse = __nccwpck_require__(6353)
|
||||
const prerelease = (version, options) => {
|
||||
const parsed = parse(version, options)
|
||||
@@ -53587,6 +53736,9 @@ module.exports = prerelease
|
||||
/***/ 2173:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const compare = __nccwpck_require__(8469)
|
||||
const rcompare = (a, b, loose) => compare(b, a, loose)
|
||||
module.exports = rcompare
|
||||
@@ -53597,6 +53749,9 @@ module.exports = rcompare
|
||||
/***/ 7192:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const compareBuild = __nccwpck_require__(7648)
|
||||
const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))
|
||||
module.exports = rsort
|
||||
@@ -53607,6 +53762,9 @@ module.exports = rsort
|
||||
/***/ 8011:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const Range = __nccwpck_require__(6782)
|
||||
const satisfies = (version, range, options) => {
|
||||
try {
|
||||
@@ -53624,6 +53782,9 @@ module.exports = satisfies
|
||||
/***/ 9872:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const compareBuild = __nccwpck_require__(7648)
|
||||
const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))
|
||||
module.exports = sort
|
||||
@@ -53634,6 +53795,9 @@ module.exports = sort
|
||||
/***/ 8780:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const parse = __nccwpck_require__(6353)
|
||||
const valid = (version, options) => {
|
||||
const v = parse(version, options)
|
||||
@@ -53647,6 +53811,9 @@ module.exports = valid
|
||||
/***/ 2088:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
// just pre-load all the stuff that index.js lazily exports
|
||||
const internalRe = __nccwpck_require__(5471)
|
||||
const constants = __nccwpck_require__(5101)
|
||||
@@ -53743,6 +53910,9 @@ module.exports = {
|
||||
/***/ 5101:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
// Note: this is the semver.org version of the spec that it implements
|
||||
// Not necessarily the package version of this code.
|
||||
const SEMVER_SPEC_VERSION = '2.0.0'
|
||||
@@ -53785,6 +53955,9 @@ module.exports = {
|
||||
/***/ 1159:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const debug = (
|
||||
typeof process === 'object' &&
|
||||
process.env &&
|
||||
@@ -53801,6 +53974,9 @@ module.exports = debug
|
||||
/***/ 3348:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const numeric = /^[0-9]+$/
|
||||
const compareIdentifiers = (a, b) => {
|
||||
const anum = numeric.test(a)
|
||||
@@ -53831,6 +54007,9 @@ module.exports = {
|
||||
/***/ 1383:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
class LRUCache {
|
||||
constructor () {
|
||||
this.max = 1000
|
||||
@@ -53878,6 +54057,9 @@ module.exports = LRUCache
|
||||
/***/ 356:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
// parse out just the options we care about
|
||||
const looseOption = Object.freeze({ loose: true })
|
||||
const emptyOpts = Object.freeze({ })
|
||||
@@ -53900,6 +54082,9 @@ module.exports = parseOptions
|
||||
/***/ 5471:
|
||||
/***/ ((module, exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const {
|
||||
MAX_SAFE_COMPONENT_LENGTH,
|
||||
MAX_SAFE_BUILD_LENGTH,
|
||||
@@ -53978,12 +54163,14 @@ createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
|
||||
|
||||
// ## Pre-release Version Identifier
|
||||
// A numeric identifier, or a non-numeric identifier.
|
||||
// Non-numberic identifiers include numberic identifiers but can be longer.
|
||||
// Therefore non-numberic identifiers must go first.
|
||||
|
||||
createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]
|
||||
}|${src[t.NONNUMERICIDENTIFIER]})`)
|
||||
createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]
|
||||
}|${src[t.NUMERICIDENTIFIER]})`)
|
||||
|
||||
createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]
|
||||
}|${src[t.NONNUMERICIDENTIFIER]})`)
|
||||
createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER]
|
||||
}|${src[t.NUMERICIDENTIFIERLOOSE]})`)
|
||||
|
||||
// ## Pre-release Version
|
||||
// Hyphen, followed by one or more dot-separated pre-release version
|
||||
@@ -54126,6 +54313,9 @@ createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$')
|
||||
/***/ 2276:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
// Determine if version is greater than all the versions possible in the range.
|
||||
const outside = __nccwpck_require__(280)
|
||||
const gtr = (version, range, options) => outside(version, range, '>', options)
|
||||
@@ -54137,6 +54327,9 @@ module.exports = gtr
|
||||
/***/ 3465:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const Range = __nccwpck_require__(6782)
|
||||
const intersects = (r1, r2, options) => {
|
||||
r1 = new Range(r1, options)
|
||||
@@ -54151,6 +54344,9 @@ module.exports = intersects
|
||||
/***/ 5213:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const outside = __nccwpck_require__(280)
|
||||
// Determine if version is less than all the versions possible in the range
|
||||
const ltr = (version, range, options) => outside(version, range, '<', options)
|
||||
@@ -54162,6 +54358,9 @@ module.exports = ltr
|
||||
/***/ 5574:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
const Range = __nccwpck_require__(6782)
|
||||
|
||||
@@ -54194,6 +54393,9 @@ module.exports = maxSatisfying
|
||||
/***/ 8595:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
const Range = __nccwpck_require__(6782)
|
||||
const minSatisfying = (versions, range, options) => {
|
||||
@@ -54225,6 +54427,9 @@ module.exports = minSatisfying
|
||||
/***/ 1866:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
const Range = __nccwpck_require__(6782)
|
||||
const gt = __nccwpck_require__(6599)
|
||||
@@ -54293,6 +54498,9 @@ module.exports = minVersion
|
||||
/***/ 280:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const SemVer = __nccwpck_require__(7163)
|
||||
const Comparator = __nccwpck_require__(9379)
|
||||
const { ANY } = Comparator
|
||||
@@ -54380,6 +54588,9 @@ module.exports = outside
|
||||
/***/ 2028:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
// given a set of versions and a range, create a "simplified" range
|
||||
// that includes the same versions that the original range does
|
||||
// If the original range is shorter than the simplified one, return that.
|
||||
@@ -54434,6 +54645,9 @@ module.exports = (versions, range, options) => {
|
||||
/***/ 1489:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const Range = __nccwpck_require__(6782)
|
||||
const Comparator = __nccwpck_require__(9379)
|
||||
const { ANY } = Comparator
|
||||
@@ -54688,6 +54902,9 @@ module.exports = subset
|
||||
/***/ 4750:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const Range = __nccwpck_require__(6782)
|
||||
|
||||
// Mostly just for testing and legacy API reasons
|
||||
@@ -54703,6 +54920,9 @@ module.exports = toComparators
|
||||
/***/ 4737:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const Range = __nccwpck_require__(6782)
|
||||
const validRange = (range, options) => {
|
||||
try {
|
||||
@@ -61044,7 +61264,7 @@ module.exports = {
|
||||
|
||||
|
||||
const { parseSetCookie } = __nccwpck_require__(8915)
|
||||
const { stringify, getHeadersList } = __nccwpck_require__(3834)
|
||||
const { stringify } = __nccwpck_require__(3834)
|
||||
const { webidl } = __nccwpck_require__(4222)
|
||||
const { Headers } = __nccwpck_require__(6349)
|
||||
|
||||
@@ -61120,14 +61340,13 @@ function getSetCookies (headers) {
|
||||
|
||||
webidl.brandCheck(headers, Headers, { strict: false })
|
||||
|
||||
const cookies = getHeadersList(headers).cookies
|
||||
const cookies = headers.getSetCookie()
|
||||
|
||||
if (!cookies) {
|
||||
return []
|
||||
}
|
||||
|
||||
// In older versions of undici, cookies is a list of name:value.
|
||||
return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
|
||||
return cookies.map((pair) => parseSetCookie(pair))
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -61555,14 +61774,15 @@ module.exports = {
|
||||
/***/ }),
|
||||
|
||||
/***/ 3834:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const assert = __nccwpck_require__(2613)
|
||||
const { kHeadersList } = __nccwpck_require__(6443)
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function isCTLExcludingHtab (value) {
|
||||
if (value.length === 0) {
|
||||
return false
|
||||
@@ -61823,31 +62043,13 @@ function stringify (cookie) {
|
||||
return out.join('; ')
|
||||
}
|
||||
|
||||
let kHeadersListNode
|
||||
|
||||
function getHeadersList (headers) {
|
||||
if (headers[kHeadersList]) {
|
||||
return headers[kHeadersList]
|
||||
}
|
||||
|
||||
if (!kHeadersListNode) {
|
||||
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
|
||||
(symbol) => symbol.description === 'headers list'
|
||||
)
|
||||
|
||||
assert(kHeadersListNode, 'Headers cannot be parsed')
|
||||
}
|
||||
|
||||
const headersList = headers[kHeadersListNode]
|
||||
assert(headersList)
|
||||
|
||||
return headersList
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
isCTLExcludingHtab,
|
||||
stringify,
|
||||
getHeadersList
|
||||
validateCookieName,
|
||||
validateCookiePath,
|
||||
validateCookieValue,
|
||||
toIMFDate,
|
||||
stringify
|
||||
}
|
||||
|
||||
|
||||
@@ -65851,6 +66053,7 @@ const {
|
||||
isValidHeaderName,
|
||||
isValidHeaderValue
|
||||
} = __nccwpck_require__(5523)
|
||||
const util = __nccwpck_require__(9023)
|
||||
const { webidl } = __nccwpck_require__(4222)
|
||||
const assert = __nccwpck_require__(2613)
|
||||
|
||||
@@ -66404,6 +66607,9 @@ Object.defineProperties(Headers.prototype, {
|
||||
[Symbol.toStringTag]: {
|
||||
value: 'Headers',
|
||||
configurable: true
|
||||
},
|
||||
[util.inspect.custom]: {
|
||||
enumerable: false
|
||||
}
|
||||
})
|
||||
|
||||
@@ -75580,6 +75786,20 @@ class Pool extends PoolBase {
|
||||
? { ...options.interceptors }
|
||||
: undefined
|
||||
this[kFactory] = factory
|
||||
|
||||
this.on('connectionError', (origin, targets, error) => {
|
||||
// If a connection error occurs, we remove the client from the pool,
|
||||
// and emit a connectionError event. They will not be re-used.
|
||||
// Fixes https://github.com/nodejs/undici/issues/3895
|
||||
for (const target of targets) {
|
||||
// Do not use kRemoveClient here, as it will close the client,
|
||||
// but the client cannot be closed in this state.
|
||||
const idx = this[kClients].indexOf(target)
|
||||
if (idx !== -1) {
|
||||
this[kClients].splice(idx, 1)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
[kGetDispatcher] () {
|
||||
@@ -77957,7 +78177,7 @@ function wrappy (fn, cb) {
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.ERROR_HINT = exports.ERROR_REQUEST = exports.EVENT_NAME_PULL_REQUEST = exports.ENV_GITHUB_EVENT_NAME = exports.GDS_GRAALVM_PRODUCT_ID = exports.GDS_BASE = exports.MANDREL_NAMESPACE = exports.GRAALVM_RELEASES_REPO = exports.GRAALVM_PLATFORM = exports.GRAALVM_GH_USER = exports.GRAALVM_FILE_EXTENSION = exports.GRAALVM_ARCH = exports.JDK_HOME_SUFFIX = exports.JDK_PLATFORM = exports.JDK_ARCH = exports.VERSION_LATEST = exports.VERSION_DEV = exports.DISTRIBUTION_LIBERICA = exports.DISTRIBUTION_MANDREL = exports.DISTRIBUTION_GRAALVM_COMMUNITY = exports.DISTRIBUTION_GRAALVM = exports.EXECUTABLE_SUFFIX = exports.IS_WINDOWS = exports.IS_MACOS = exports.IS_LINUX = exports.NATIVE_IMAGE_OPTIONS_ENV = exports.INPUT_NI_MUSL = exports.INPUT_CHECK_FOR_UPDATES = exports.INPUT_CACHE = exports.INPUT_SET_JAVA_HOME = exports.INPUT_GITHUB_TOKEN = exports.INPUT_COMPONENTS = exports.INPUT_DISTRIBUTION = exports.INPUT_JAVA_PACKAGE = exports.INPUT_JAVA_VERSION = exports.INPUT_GDS_TOKEN = exports.INPUT_VERSION = exports.ACTION_VERSION = void 0;
|
||||
exports.ACTION_VERSION = '1.3.3';
|
||||
exports.ACTION_VERSION = '1.3.5';
|
||||
exports.INPUT_VERSION = 'version';
|
||||
exports.INPUT_GDS_TOKEN = 'gds-token';
|
||||
exports.INPUT_JAVA_VERSION = 'java-version';
|
||||
@@ -80264,24 +80484,15 @@ exports.setNativeImageOption = setNativeImageOption;
|
||||
const c = __importStar(__nccwpck_require__(7242));
|
||||
const core = __importStar(__nccwpck_require__(7484));
|
||||
const github = __importStar(__nccwpck_require__(3228));
|
||||
const httpClient = __importStar(__nccwpck_require__(4844));
|
||||
const semver = __importStar(__nccwpck_require__(2088));
|
||||
const tc = __importStar(__nccwpck_require__(3472));
|
||||
const fs = __importStar(__nccwpck_require__(9896));
|
||||
const exec_1 = __nccwpck_require__(5236);
|
||||
const fs_1 = __nccwpck_require__(9896);
|
||||
const core_1 = __nccwpck_require__(1897);
|
||||
const crypto_1 = __nccwpck_require__(6982);
|
||||
const path_1 = __nccwpck_require__(6928);
|
||||
const os_1 = __nccwpck_require__(857);
|
||||
// Set up Octokit for github.com only and in the same way as @actions/github (see https://git.io/Jy9YP)
|
||||
const baseUrl = 'https://api.github.com';
|
||||
const GitHubDotCom = core_1.Octokit.defaults({
|
||||
baseUrl,
|
||||
request: {
|
||||
agent: new httpClient.HttpClient().getAgent(baseUrl)
|
||||
}
|
||||
});
|
||||
const utils_1 = __nccwpck_require__(8006);
|
||||
async function exec(commandLine, args, options) {
|
||||
const exitCode = await (0, exec_1.exec)(commandLine, args, options);
|
||||
if (exitCode !== 0) {
|
||||
@@ -80289,18 +80500,14 @@ async function exec(commandLine, args, options) {
|
||||
}
|
||||
}
|
||||
async function getLatestRelease(repo) {
|
||||
const githubToken = getGitHubToken();
|
||||
const options = githubToken.length > 0 ? { auth: githubToken } : {};
|
||||
const octokit = new GitHubDotCom(options);
|
||||
const octokit = getOctokit();
|
||||
return (await octokit.request('GET /repos/{owner}/{repo}/releases/latest', {
|
||||
owner: c.GRAALVM_GH_USER,
|
||||
repo
|
||||
})).data;
|
||||
}
|
||||
async function getContents(repo, path) {
|
||||
const githubToken = getGitHubToken();
|
||||
const options = githubToken.length > 0 ? { auth: githubToken } : {};
|
||||
const octokit = new GitHubDotCom(options);
|
||||
const octokit = getOctokit();
|
||||
return (await octokit.request('GET /repos/{owner}/{repo}/contents/{path}', {
|
||||
owner: c.GRAALVM_GH_USER,
|
||||
repo,
|
||||
@@ -80308,9 +80515,7 @@ async function getContents(repo, path) {
|
||||
})).data;
|
||||
}
|
||||
async function getTaggedRelease(owner, repo, tag) {
|
||||
const githubToken = getGitHubToken();
|
||||
const options = githubToken.length > 0 ? { auth: githubToken } : {};
|
||||
const octokit = new GitHubDotCom(options);
|
||||
const octokit = getOctokit();
|
||||
return (await octokit.request('GET /repos/{owner}/{repo}/releases/tags/{tag}', {
|
||||
owner,
|
||||
repo,
|
||||
@@ -80318,9 +80523,7 @@ async function getTaggedRelease(owner, repo, tag) {
|
||||
})).data;
|
||||
}
|
||||
async function getMatchingTags(owner, repo, tagPrefix) {
|
||||
const githubToken = getGitHubToken();
|
||||
const options = githubToken.length > 0 ? { auth: githubToken } : {};
|
||||
const octokit = new GitHubDotCom(options);
|
||||
const octokit = getOctokit();
|
||||
return (await octokit.request('GET /repos/{owner}/{repo}/git/matching-refs/tags/{tagPrefix}', {
|
||||
owner,
|
||||
repo,
|
||||
@@ -80388,15 +80591,23 @@ function toSemVer(version) {
|
||||
function isPREvent() {
|
||||
return process.env[c.ENV_GITHUB_EVENT_NAME] === c.EVENT_NAME_PULL_REQUEST;
|
||||
}
|
||||
function getGitHubToken() {
|
||||
return core.getInput(c.INPUT_GITHUB_TOKEN);
|
||||
function getOctokit() {
|
||||
/* Set up GitHub instance manually because @actions/github does not allow unauthenticated access */
|
||||
const GitHubWithPlugins = utils_1.GitHub.plugin();
|
||||
const token = core.getInput(c.INPUT_GITHUB_TOKEN);
|
||||
if (token) {
|
||||
return new GitHubWithPlugins({ auth: `token ${token}` });
|
||||
}
|
||||
else {
|
||||
return new GitHubWithPlugins(); /* unauthenticated */
|
||||
}
|
||||
}
|
||||
async function findExistingPRCommentId(bodyStartsWith) {
|
||||
if (!isPREvent()) {
|
||||
throw new Error('Not a PR event.');
|
||||
}
|
||||
const context = github.context;
|
||||
const octokit = github.getOctokit(getGitHubToken());
|
||||
const octokit = getOctokit();
|
||||
try {
|
||||
const comments = await octokit.paginate(octokit.rest.issues.listComments, {
|
||||
...context.repo,
|
||||
@@ -80416,7 +80627,7 @@ async function updatePRComment(content, commentId) {
|
||||
throw new Error('Not a PR event.');
|
||||
}
|
||||
try {
|
||||
await github.getOctokit(getGitHubToken()).rest.issues.updateComment({
|
||||
await getOctokit().rest.issues.updateComment({
|
||||
...github.context.repo,
|
||||
comment_id: commentId,
|
||||
body: content
|
||||
@@ -80432,7 +80643,7 @@ async function createPRComment(content) {
|
||||
}
|
||||
const context = github.context;
|
||||
try {
|
||||
await github.getOctokit(getGitHubToken()).rest.issues.createComment({
|
||||
await getOctokit().rest.issues.createComment({
|
||||
...context.repo,
|
||||
issue_number: context.payload.pull_request?.number,
|
||||
body: content
|
||||
@@ -92307,7 +92518,7 @@ exports["default"] = version;
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"4.0.2","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","@protobuf-ts/plugin":"^2.9.4","semver":"^6.3.1"},"devDependencies":{"@types/semver":"^6.0.0","typescript":"^5.2.2"}}');
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"4.0.3","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","@protobuf-ts/plugin":"^2.9.4","semver":"^6.3.1"},"devDependencies":{"@types/node":"^22.13.9","@types/semver":"^6.0.0","typescript":"^5.2.2"}}');
|
||||
|
||||
/***/ })
|
||||
|
||||
|
||||
1449
package-lock.json
generated
1449
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
45
package.json
45
package.json
@@ -2,7 +2,7 @@
|
||||
"name": "setup-graalvm",
|
||||
"author": "GraalVM Community",
|
||||
"description": "GitHub Action for GraalVM",
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.5",
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -33,43 +33,42 @@
|
||||
},
|
||||
"license": "UPL",
|
||||
"dependencies": {
|
||||
"@actions/cache": "^4.0.2",
|
||||
"@actions/cache": "^4.0.3",
|
||||
"@actions/core": "^1.11.1",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/github": "^6.0.0",
|
||||
"@actions/github": "^6.0.1",
|
||||
"@actions/glob": "^0.5.0",
|
||||
"@actions/http-client": "^2.2.3",
|
||||
"@actions/io": "^1.1.3",
|
||||
"@actions/tool-cache": "^2.0.2",
|
||||
"@octokit/core": "^5.2.0",
|
||||
"@octokit/types": "^13.8.0",
|
||||
"@github/dependency-submission-toolkit": "^2.0.4",
|
||||
"semver": "^7.7.1",
|
||||
"@octokit/types": "^14.1.0",
|
||||
"@github/dependency-submission-toolkit": "^2.0.5",
|
||||
"semver": "^7.7.2",
|
||||
"uuid": "^11.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "^1.2.7",
|
||||
"@eslint/compat": "^1.3.1",
|
||||
"@types/jest": "^29.5.14",
|
||||
"@types/node": "^20.17.22",
|
||||
"@types/semver": "^7.5.8",
|
||||
"@types/node": "^20.19.4",
|
||||
"@types/semver": "^7.7.0",
|
||||
"@types/uuid": "^10.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.25.0",
|
||||
"@typescript-eslint/parser": "^8.25.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.35.1",
|
||||
"@typescript-eslint/parser": "^8.31.1",
|
||||
"@vercel/ncc": "^0.38.3",
|
||||
"eslint": "^9.21.0",
|
||||
"eslint-config-prettier": "^10.0.2",
|
||||
"eslint-import-resolver-typescript": "^3.8.3",
|
||||
"eslint-plugin-import": "^2.31.0",
|
||||
"eslint-plugin-jest": "^28.10.0",
|
||||
"eslint-plugin-jsonc": "^2.19.1",
|
||||
"eslint": "^9.30.1",
|
||||
"eslint-config-prettier": "^10.1.5",
|
||||
"eslint-import-resolver-typescript": "^4.4.4",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
"eslint-plugin-jest": "^29.0.1",
|
||||
"eslint-plugin-jsonc": "^2.20.1",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-prettier": "^5.2.3",
|
||||
"eslint-plugin-prettier": "^5.5.1",
|
||||
"jest": "^29.7.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"prettier": "^3.5.3",
|
||||
"prettier-eslint": "^16.3.0",
|
||||
"ts-jest": "^29.2.6",
|
||||
"prettier": "^3.6.2",
|
||||
"prettier-eslint": "^16.4.2",
|
||||
"ts-jest": "^29.4.0",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.7.3"
|
||||
"typescript": "^5.8.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as otypes from '@octokit/types'
|
||||
|
||||
export const ACTION_VERSION = '1.3.3'
|
||||
export const ACTION_VERSION = '1.3.5'
|
||||
|
||||
export const INPUT_VERSION = 'version'
|
||||
export const INPUT_GDS_TOKEN = 'gds-token'
|
||||
|
||||
45
src/utils.ts
45
src/utils.ts
@@ -1,25 +1,15 @@
|
||||
import * as c from './constants'
|
||||
import * as core from '@actions/core'
|
||||
import * as github from '@actions/github'
|
||||
import * as httpClient from '@actions/http-client'
|
||||
import * as semver from 'semver'
|
||||
import * as tc from '@actions/tool-cache'
|
||||
import * as fs from 'fs'
|
||||
import { ExecOptions, exec as e } from '@actions/exec'
|
||||
import { readFileSync, readdirSync } from 'fs'
|
||||
import { Octokit } from '@octokit/core'
|
||||
import { createHash } from 'crypto'
|
||||
import { join } from 'path'
|
||||
import { tmpdir } from 'os'
|
||||
|
||||
// Set up Octokit for github.com only and in the same way as @actions/github (see https://git.io/Jy9YP)
|
||||
const baseUrl = 'https://api.github.com'
|
||||
const GitHubDotCom = Octokit.defaults({
|
||||
baseUrl,
|
||||
request: {
|
||||
agent: new httpClient.HttpClient().getAgent(baseUrl)
|
||||
}
|
||||
})
|
||||
import { GitHub } from '@actions/github/lib/utils'
|
||||
|
||||
export async function exec(commandLine: string, args?: string[], options?: ExecOptions | undefined): Promise<void> {
|
||||
const exitCode = await e(commandLine, args, options)
|
||||
@@ -29,9 +19,7 @@ export async function exec(commandLine: string, args?: string[], options?: ExecO
|
||||
}
|
||||
|
||||
export async function getLatestRelease(repo: string): Promise<c.LatestReleaseResponse['data']> {
|
||||
const githubToken = getGitHubToken()
|
||||
const options = githubToken.length > 0 ? { auth: githubToken } : {}
|
||||
const octokit = new GitHubDotCom(options)
|
||||
const octokit = getOctokit()
|
||||
return (
|
||||
await octokit.request('GET /repos/{owner}/{repo}/releases/latest', {
|
||||
owner: c.GRAALVM_GH_USER,
|
||||
@@ -41,9 +29,7 @@ export async function getLatestRelease(repo: string): Promise<c.LatestReleaseRes
|
||||
}
|
||||
|
||||
export async function getContents(repo: string, path: string): Promise<c.ContentsResponse['data']> {
|
||||
const githubToken = getGitHubToken()
|
||||
const options = githubToken.length > 0 ? { auth: githubToken } : {}
|
||||
const octokit = new GitHubDotCom(options)
|
||||
const octokit = getOctokit()
|
||||
return (
|
||||
await octokit.request('GET /repos/{owner}/{repo}/contents/{path}', {
|
||||
owner: c.GRAALVM_GH_USER,
|
||||
@@ -58,9 +44,7 @@ export async function getTaggedRelease(
|
||||
repo: string,
|
||||
tag: string
|
||||
): Promise<c.LatestReleaseResponse['data']> {
|
||||
const githubToken = getGitHubToken()
|
||||
const options = githubToken.length > 0 ? { auth: githubToken } : {}
|
||||
const octokit = new GitHubDotCom(options)
|
||||
const octokit = getOctokit()
|
||||
return (
|
||||
await octokit.request('GET /repos/{owner}/{repo}/releases/tags/{tag}', {
|
||||
owner,
|
||||
@@ -75,9 +59,7 @@ export async function getMatchingTags(
|
||||
repo: string,
|
||||
tagPrefix: string
|
||||
): Promise<c.MatchingRefsResponse['data']> {
|
||||
const githubToken = getGitHubToken()
|
||||
const options = githubToken.length > 0 ? { auth: githubToken } : {}
|
||||
const octokit = new GitHubDotCom(options)
|
||||
const octokit = getOctokit()
|
||||
return (
|
||||
await octokit.request('GET /repos/{owner}/{repo}/git/matching-refs/tags/{tagPrefix}', {
|
||||
owner,
|
||||
@@ -156,8 +138,15 @@ export function isPREvent(): boolean {
|
||||
return process.env[c.ENV_GITHUB_EVENT_NAME] === c.EVENT_NAME_PULL_REQUEST
|
||||
}
|
||||
|
||||
function getGitHubToken(): string {
|
||||
return core.getInput(c.INPUT_GITHUB_TOKEN)
|
||||
function getOctokit(): InstanceType<typeof GitHub> {
|
||||
/* Set up GitHub instance manually because @actions/github does not allow unauthenticated access */
|
||||
const GitHubWithPlugins = GitHub.plugin()
|
||||
const token = core.getInput(c.INPUT_GITHUB_TOKEN)
|
||||
if (token) {
|
||||
return new GitHubWithPlugins({ auth: `token ${token}` })
|
||||
} else {
|
||||
return new GitHubWithPlugins() /* unauthenticated */
|
||||
}
|
||||
}
|
||||
|
||||
export async function findExistingPRCommentId(bodyStartsWith: string): Promise<number | undefined> {
|
||||
@@ -166,7 +155,7 @@ export async function findExistingPRCommentId(bodyStartsWith: string): Promise<n
|
||||
}
|
||||
|
||||
const context = github.context
|
||||
const octokit = github.getOctokit(getGitHubToken())
|
||||
const octokit = getOctokit()
|
||||
try {
|
||||
const comments = await octokit.paginate(octokit.rest.issues.listComments, {
|
||||
...context.repo,
|
||||
@@ -189,7 +178,7 @@ export async function updatePRComment(content: string, commentId: number): Promi
|
||||
}
|
||||
|
||||
try {
|
||||
await github.getOctokit(getGitHubToken()).rest.issues.updateComment({
|
||||
await getOctokit().rest.issues.updateComment({
|
||||
...github.context.repo,
|
||||
comment_id: commentId,
|
||||
body: content
|
||||
@@ -207,7 +196,7 @@ export async function createPRComment(content: string): Promise<void> {
|
||||
}
|
||||
const context = github.context
|
||||
try {
|
||||
await github.getOctokit(getGitHubToken()).rest.issues.createComment({
|
||||
await getOctokit().rest.issues.createComment({
|
||||
...context.repo,
|
||||
issue_number: context.payload.pull_request?.number as number,
|
||||
body: content
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"extends": "./tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"isolatedModules": true,
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"outDir": "./dist"
|
||||
|
||||
Reference in New Issue
Block a user