Skip to content

Commit

Permalink
fix: don't use reviewdog except for pull_request event
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke committed Oct 27, 2021
1 parent b4c735e commit 803dc7d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test-actions.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
name: test-actions
on:
push:
branches: [main]
tags: [v*]
pull_request:
branches: [main]
permissions:
Expand Down
17 changes: 11 additions & 6 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@ runs:
using: composite
steps:
- run: |
golangci-lint run --out-format checkstyle |
reviewdog -f=checkstyle \
-name="golangci-lint" \
-reporter=github-pr-review \
-level=warning \
-fail-on-error=1
if [ "$EVENT_NAME" = "pull_request" ]; then
golangci-lint run --out-format checkstyle |
reviewdog -f=checkstyle \
-name="golangci-lint" \
-reporter=github-pr-review \
-level=warning \
-fail-on-error=1
else
golangci-lint run
fi
shell: bash
working-directory: ${{ inputs.working_directory }}
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ inputs.github_token }}
EVENT_NAME: ${{ github.event_name }}

0 comments on commit 803dc7d

Please sign in to comment.