Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Fix github actions for contributors. (#133)
Browse files Browse the repository at this point in the history
* Fix github actions for contributors.

* Fix github actions for contributors.

* Update ci.yml

* Fix github actions.

* Fix github actions.

* Fix github actions.

* Fix github actions.

* Fix github actions.

* Update ci.yml

* Update ci.yml
  • Loading branch information
BupycHuk authored Jun 7, 2021
1 parent 21d3713 commit 333c1b8
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,20 +196,28 @@ jobs:
- name: Install tools
run: make init

- name: Run checks/linters
- name: Run required checks/linters
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# use GITHUB_TOKEN because only it has access to GitHub Checks API
bin/golangci-lint run -c=.golangci-required.yml --out-format=line-number | env REVIEWDOG_GITHUB_API_TOKEN=${{ secrets.GITHUB_TOKEN }} bin/reviewdog -f=golangci-lint -name='Required checks' -reporter=github-pr-check
# use ROBOT_TOKEN for better reviewer's name
bin/golangci-lint run --out-format=line-number | env REVIEWDOG_GITHUB_API_TOKEN=${{ secrets.ROBOT_TOKEN }} bin/reviewdog -f=golangci-lint -name='Linters' -reporter=github-pr-review
bin/golangci-lint run -c=.golangci-required.yml --out-format=line-number | bin/reviewdog -f=golangci-lint -name='Required checks' -reporter=github-pr-check
# run it like that until some of those issues/PRs are resolved:
# * https://github.com/quasilyte/go-consistent/issues/33
# * https://github.com/golangci/golangci-lint/issues/288
# * https://github.com/reviewdog/errorformat/pull/47 (once it is atually used by reviewdog)
bin/go-consistent -pedantic ./...
- name: Run optional checks/linters
run: |
# use ROBOT_TOKEN for better reviewer's name
if [[ ! -z "${{ secrets.ROBOT_TOKEN }}" ]]; then
bin/golangci-lint run --out-format=line-number | env REVIEWDOG_GITHUB_API_TOKEN=${{ secrets.ROBOT_TOKEN }} bin/reviewdog -f=golangci-lint -name='Linters' -reporter=github-pr-review
else
bin/golangci-lint run --out-format=line-number | env REVIEWDOG_GITHUB_API_TOKEN=${{ secrets.GITHUB_TOKEN }} bin/reviewdog -f=golangci-lint -name='Linters' -reporter=github-pr-review
fi
- name: Check that there are no source code changes
run: |
# Break job if any files were changed during its run (tools installation, etc), except go.sum.
Expand Down

0 comments on commit 333c1b8

Please sign in to comment.