Skip to content

Commit

Permalink
Set output path with a path to golangci-lint binary
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Vilgelm committed Dec 29, 2020
1 parent 856e970 commit 3747c11
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions 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"
Expand All @@ -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"
Expand Down
1 change: 1 addition & 0 deletions dist/post_run/index.js
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions dist/run/index.js
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions src/run.ts
Expand Up @@ -187,6 +187,7 @@ async function runLint(lintPath: string, patchPath: string): Promise<void> {
export async function run(): Promise<void> {
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}`)
Expand Down

0 comments on commit 3747c11

Please sign in to comment.