From 67503c7b3df4e1dcf5dab2a5e1ae0db45db974ad Mon Sep 17 00:00:00 2001 From: Aleksandr Razumov Date: Sun, 26 Apr 2020 19:40:37 +0300 Subject: [PATCH 1/3] readme: improve --- README.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1694dff..3e4f7fa 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,25 @@ # golangci-lint-action -Work in progress +![docker image](https://github.com/golangci/golangci-lint-action/workflows/docker%20image/badge.svg) + +Action that runs [golangci-lint](https://github.com/golangci/golangci-lint) and reports issues from linters. + +You can put `.github/workflows/lint.yml` with following contents: +```yaml +name: golangci +on: [push] +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v1 + - name: golangci-lint + uses: golangci/golangci-lint-action@v0.0.2 + with: + github_token: ${{ secrets.github_token }} + +``` Based on [reviewdog action](https://github.com/reviewdog/action-golangci-lint). From 4cb8a13e45cc89340313ba266c1a86a9a6e69aba Mon Sep 17 00:00:00 2001 From: Aleksandr Razumov Date: Sun, 26 Apr 2020 19:41:24 +0300 Subject: [PATCH 2/3] action: make github token optional --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index b6ba408..4304ee4 100644 --- a/action.yml +++ b/action.yml @@ -5,7 +5,7 @@ author: 'golangci' inputs: github_token: description: 'GITHUB_TOKEN' - required: true + required: false flags: description: 'GolangCI command line flags' required: false From 9c543591de485fe961441fbf7be376e417cfae0b Mon Sep 17 00:00:00 2001 From: Aleksandr Razumov Date: Sun, 26 Apr 2020 19:43:53 +0300 Subject: [PATCH 3/3] workflow: remove github token --- .github/workflows/golangci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/golangci.yml b/.github/workflows/golangci.yml index 6096b5e..bf9d81e 100644 --- a/.github/workflows/golangci.yml +++ b/.github/workflows/golangci.yml @@ -10,7 +10,6 @@ jobs: - name: golangci-lint uses: ./ with: - github_token: ${{ secrets.github_token }} directory: sample format: colored-line-number flags: --issues-exit-code 0