From 1c50240be21009d0894c6d1a4daf27fc74c19fca Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Fri, 14 Feb 2025 13:56:21 +0100 Subject: [PATCH 1/2] fix: use config arg for verify (#1168) --- dist/post_run/index.js | 5 ++++- dist/run/index.js | 5 ++++- src/run.ts | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/dist/post_run/index.js b/dist/post_run/index.js index 8586a27319..367f3bf47e 100644 --- a/dist/post_run/index.js +++ b/dist/post_run/index.js @@ -94124,7 +94124,10 @@ async function runLint(binPath, patchPath) { cmdArgs.cwd = path.resolve(workingDirectory); } if (core.getBooleanInput(`verify`, { required: true })) { - const cmdVerify = `${binPath} config verify`; + let cmdVerify = `${binPath} config verify`; + if (userArgsMap.get("config")) { + cmdVerify += ` --config=${userArgsMap.get("config")}`; + } core.info(`Running [${cmdVerify}] in [${cmdArgs.cwd || process.cwd()}] ...`); const res = await execShellCommand(cmdVerify, cmdArgs); printOutput(res); diff --git a/dist/run/index.js b/dist/run/index.js index b9e694e10a..c9d892bcb2 100644 --- a/dist/run/index.js +++ b/dist/run/index.js @@ -94124,7 +94124,10 @@ async function runLint(binPath, patchPath) { cmdArgs.cwd = path.resolve(workingDirectory); } if (core.getBooleanInput(`verify`, { required: true })) { - const cmdVerify = `${binPath} config verify`; + let cmdVerify = `${binPath} config verify`; + if (userArgsMap.get("config")) { + cmdVerify += ` --config=${userArgsMap.get("config")}`; + } core.info(`Running [${cmdVerify}] in [${cmdArgs.cwd || process.cwd()}] ...`); const res = await execShellCommand(cmdVerify, cmdArgs); printOutput(res); diff --git a/src/run.ts b/src/run.ts index 3addc14efa..19683f9a57 100644 --- a/src/run.ts +++ b/src/run.ts @@ -138,7 +138,10 @@ async function runLint(binPath: string, patchPath: string): Promise { } if (core.getBooleanInput(`verify`, { required: true })) { - const cmdVerify = `${binPath} config verify` + let cmdVerify = `${binPath} config verify` + if (userArgsMap.get("config")) { + cmdVerify += ` --config=${userArgsMap.get("config")}` + } core.info(`Running [${cmdVerify}] in [${cmdArgs.cwd || process.cwd()}] ...`) From 818ec4d51a1feacefc42ff1b3ec25d4962690f39 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Fri, 14 Feb 2025 13:57:12 +0100 Subject: [PATCH 2/2] 6.4.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8db02beb43..946bd561c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "golanci-lint-action", - "version": "6.4.0", + "version": "6.4.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "golanci-lint-action", - "version": "6.4.0", + "version": "6.4.1", "license": "MIT", "dependencies": { "@actions/cache": "^4.0.0", diff --git a/package.json b/package.json index 6462a8eb68..f45a6fa282 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "golanci-lint-action", - "version": "6.4.0", + "version": "6.4.1", "private": true, "description": "golangci-lint github action", "main": "dist/main.js",