Skip to content

Commit

Permalink
Merge pull request #94 from reviewdog/upgrading-to-v2
Browse files Browse the repository at this point in the history
Migrating from v1 to v2
  • Loading branch information
shogo82148 committed Jul 24, 2021
2 parents 997d218 + 280cbc5 commit 319f20f
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions README.md
Expand Up @@ -12,6 +12,43 @@ code review experience.
[![check tab example](https://user-images.githubusercontent.com/3797062/64919922-d279e100-d7eb-11e9-800d-9cef86c670df.png)](https://github.com/reviewdog/action-golangci-lint/pull/10/checks?check_run_id=222708776)
[![status check example](https://user-images.githubusercontent.com/3797062/64919933-0b19ba80-d7ec-11e9-96cc-f6558f04924f.png)](https://github.com/reviewdog/action-golangci-lint/pull/10)

## Migrating from v1 to v2

In many cases, you need to do nothing. Just use `reviewdog/action-golangci-lint@v2` instead of `reviewdog/action-golangci-lint@v1`.

If your workflow have steps for setting up Go and caching go modules, they are no longer needed.
`reviewdog/action-golangci-lint@v2` now set up Go and cache modules automatically, so remove these steps.

```yaml
on: [pull_request]
jobs:
golangci-lint:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

# no need with v2
# - name: Set up Go
# uses: actions/setup-go@v2
# with:
# go-version: '1.16'

# no need with v2
# - uses: actions/cache@v2
# with:
# path: |
# ~/.cache/golangci-lint
# ~/.cache/go-build
# ~/go/pkg/mod
# key: ${{ runner.os }}-golangcilint-${{ hashFiles('**/go.sum') }}
# restore-keys: |
# ${{ runner.os }}-golangcilint-

- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
```

## Inputs

### `github_token`
Expand Down

0 comments on commit 319f20f

Please sign in to comment.