diff --git a/action.yml b/action.yml index 0f3510646c..b28cf4c361 100644 --- a/action.yml +++ b/action.yml @@ -1,4 +1,3 @@ ---- name: "Run golangci-lint" description: "Official golangci-lint action with line-attached annotations for found issues, caching and parallel execution." author: "golangci" @@ -25,7 +24,9 @@ inputs: description: "if set to true then the action uses pre-install Go" default: false required: true - +outputs: + path: + description: "The path where the golangci-lint binary installed" runs: using: "node12" main: "dist/run/index.js" diff --git a/dist/post_run/index.js b/dist/post_run/index.js index dab5ec6d25..f91a977715 100644 --- a/dist/post_run/index.js +++ b/dist/post_run/index.js @@ -7169,6 +7169,7 @@ function run() { return __awaiter(this, void 0, void 0, function* () { try { const { lintPath, patchPath } = yield core.group(`prepare environment`, prepareEnv); + core.setOutput("path", lintPath); yield core.group(`run golangci-lint`, () => runLint(lintPath, patchPath)); } catch (error) { diff --git a/dist/run/index.js b/dist/run/index.js index 0acc6f4e65..be20beab39 100644 --- a/dist/run/index.js +++ b/dist/run/index.js @@ -7179,6 +7179,7 @@ function run() { return __awaiter(this, void 0, void 0, function* () { try { const { lintPath, patchPath } = yield core.group(`prepare environment`, prepareEnv); + core.setOutput("path", lintPath); yield core.group(`run golangci-lint`, () => runLint(lintPath, patchPath)); } catch (error) { diff --git a/src/run.ts b/src/run.ts index 95dd13dc18..e0339da2bd 100644 --- a/src/run.ts +++ b/src/run.ts @@ -187,6 +187,7 @@ async function runLint(lintPath: string, patchPath: string): Promise { export async function run(): Promise { try { const { lintPath, patchPath } = await core.group(`prepare environment`, prepareEnv) + core.setOutput("path", lintPath) await core.group(`run golangci-lint`, () => runLint(lintPath, patchPath)) } catch (error) { core.error(`Failed to run: ${error}, ${error.stack}`)