Skip to content

Commit 3747c11

Browse files
author
Sergey Vilgelm
committed
Set output path with a path to golangci-lint binary
1 parent 856e970 commit 3747c11

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

action.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
name: "Run golangci-lint"
32
description: "Official golangci-lint action with line-attached annotations for found issues, caching and parallel execution."
43
author: "golangci"
@@ -25,7 +24,9 @@ inputs:
2524
description: "if set to true then the action uses pre-install Go"
2625
default: false
2726
required: true
28-
27+
outputs:
28+
path:
29+
description: "The path where the golangci-lint binary installed"
2930
runs:
3031
using: "node12"
3132
main: "dist/run/index.js"

dist/post_run/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7169,6 +7169,7 @@ function run() {
71697169
return __awaiter(this, void 0, void 0, function* () {
71707170
try {
71717171
const { lintPath, patchPath } = yield core.group(`prepare environment`, prepareEnv);
7172+
core.setOutput("path", lintPath);
71727173
yield core.group(`run golangci-lint`, () => runLint(lintPath, patchPath));
71737174
}
71747175
catch (error) {

dist/run/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7179,6 +7179,7 @@ function run() {
71797179
return __awaiter(this, void 0, void 0, function* () {
71807180
try {
71817181
const { lintPath, patchPath } = yield core.group(`prepare environment`, prepareEnv);
7182+
core.setOutput("path", lintPath);
71827183
yield core.group(`run golangci-lint`, () => runLint(lintPath, patchPath));
71837184
}
71847185
catch (error) {

src/run.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ async function runLint(lintPath: string, patchPath: string): Promise<void> {
187187
export async function run(): Promise<void> {
188188
try {
189189
const { lintPath, patchPath } = await core.group(`prepare environment`, prepareEnv)
190+
core.setOutput("path", lintPath)
190191
await core.group(`run golangci-lint`, () => runLint(lintPath, patchPath))
191192
} catch (error) {
192193
core.error(`Failed to run: ${error}, ${error.stack}`)

0 commit comments

Comments
 (0)