Merge branch 'actions:main' into main

This commit is contained in:
Sascha Ronnie Daoudia 2023-12-14 14:13:35 +01:00 committed by GitHub
commit 7cc6d0b85a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 66845 additions and 19461 deletions

View file

@ -14,3 +14,5 @@ jobs:
call-basic-validation: call-basic-validation:
name: Basic validation name: Basic validation
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main
with:
node-version: '20'

View file

@ -15,3 +15,5 @@ jobs:
call-check-dist: call-check-dist:
name: Check dist/ name: Check dist/
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
with:
node-version: '20'

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/@fastify/busboy.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/lru-cache.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/semver-7.5.4.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/undici-types.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/yallist.dep.yml generated Normal file

Binary file not shown.

36236
dist/cache-save/index.js vendored

File diff suppressed because one or more lines are too long

40885
dist/setup/index.js vendored

File diff suppressed because one or more lines are too long

8786
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{ {
"name": "setup-go", "name": "setup-go",
"version": "4.0.0", "version": "5.0.0",
"private": true, "private": true,
"description": "setup go action", "description": "setup go action",
"main": "lib/setup-go.js", "main": "lib/setup-go.js",
@ -28,28 +28,28 @@
"@actions/cache": "^3.2.1", "@actions/cache": "^3.2.1",
"@actions/core": "^1.10.0", "@actions/core": "^1.10.0",
"@actions/exec": "^1.1.0", "@actions/exec": "^1.1.0",
"@actions/glob": "^0.2.0", "@actions/glob": "^0.4.0",
"@actions/http-client": "^2.0.1", "@actions/http-client": "^2.0.1",
"@actions/io": "^1.0.2", "@actions/io": "^1.0.2",
"@actions/tool-cache": "^1.5.5", "@actions/tool-cache": "^2.0.1",
"semver": "^6.3.1" "semver": "^7.5.4"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^27.0.2", "@types/jest": "^29.5.10",
"@types/node": "^16.11.25", "@types/node": "^20.10.3",
"@types/semver": "^6.0.0", "@types/semver": "^7.5.6",
"@typescript-eslint/eslint-plugin": "^5.54.0", "@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0", "@typescript-eslint/parser": "^5.54.0",
"@vercel/ncc": "^0.33.4", "@vercel/ncc": "^0.38.1",
"eslint": "^8.35.0", "eslint": "^8.35.0",
"eslint-config-prettier": "^8.6.0", "eslint-config-prettier": "^8.6.0",
"eslint-plugin-jest": "^27.2.1", "eslint-plugin-jest": "^27.2.1",
"eslint-plugin-node": "^11.1.0", "eslint-plugin-node": "^11.1.0",
"jest": "^27.2.5", "jest": "^29.7.0",
"jest-circus": "^27.2.5", "jest-circus": "^29.7.0",
"nock": "^10.0.6", "nock": "^10.0.6",
"prettier": "^2.8.4", "prettier": "^2.8.4",
"ts-jest": "^27.0.5", "ts-jest": "^29.1.1",
"typescript": "^4.3.3" "typescript": "^5.3.2"
} }
} }

View file

@ -12,9 +12,19 @@ process.on('uncaughtException', e => {
core.info(`${warningPrefix}${e.message}`); core.info(`${warningPrefix}${e.message}`);
}); });
export async function run() { // Added early exit to resolve issue with slow post action step:
// - https://github.com/actions/setup-node/issues/878
// https://github.com/actions/cache/pull/1217
export async function run(earlyExit?: boolean) {
try { try {
const cacheInput = core.getBooleanInput('cache');
if (cacheInput) {
await cachePackages(); await cachePackages();
if (earlyExit) {
process.exit(0);
}
}
} catch (error) { } catch (error) {
let message = 'Unknown error!'; let message = 'Unknown error!';
if (error instanceof Error) { if (error instanceof Error) {
@ -28,11 +38,6 @@ export async function run() {
} }
const cachePackages = async () => { const cachePackages = async () => {
const cacheInput = core.getBooleanInput('cache');
if (!cacheInput) {
return;
}
const packageManager = 'default'; const packageManager = 'default';
const state = core.getState(State.CacheMatchedKey); const state = core.getState(State.CacheMatchedKey);
@ -85,4 +90,4 @@ function logWarning(message: string): void {
core.info(`${warningPrefix}${message}`); core.info(`${warningPrefix}${message}`);
} }
run(); run(true);

View file

@ -114,9 +114,9 @@ export async function getGo(
`Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded` `Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded`
); );
} else { } else {
core.info(err.message); core.info((err as Error).message);
} }
core.debug(err.stack); core.debug((err as Error).stack ?? '');
core.info('Falling back to download directly from Go'); core.info('Falling back to download directly from Go');
} }
@ -160,7 +160,7 @@ async function resolveVersionFromManifest(
return info?.resolvedVersion; return info?.resolvedVersion;
} catch (err) { } catch (err) {
core.info('Unable to resolve a version from the manifest...'); core.info('Unable to resolve a version from the manifest...');
core.debug(err.message); core.debug((err as Error).message);
} }
} }

View file

@ -74,7 +74,7 @@ export async function run() {
cacheDependencyPath cacheDependencyPath
); );
} catch (error) { } catch (error) {
core.warning(`Restore cache failed: ${error.message}`); core.warning(`Restore cache failed: ${(error as Error).message}`);
} }
} }
@ -92,7 +92,7 @@ export async function run() {
core.info(goEnv); core.info(goEnv);
core.endGroup(); core.endGroup();
} catch (error) { } catch (error) {
core.setFailed(error.message); core.setFailed((error as Error).message);
} }
} }