From dcaf6396c60ec6fa394115d2873ff511e6baf56e Mon Sep 17 00:00:00 2001 From: Artem Gavrilov Date: Tue, 4 Oct 2022 13:54:36 +0200 Subject: [PATCH] Run optional linters only for pull requests (#1280) --- .github/workflows/common.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 531d072de4..d35ef555e5 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -80,7 +80,7 @@ jobs: - name: Run go-sumtype run: bin/go-sumtype ./... - - name: Run golangci-lint + - name: Run required linters uses: reviewdog/action-golangci-lint@v2 with: github_token: ${{ secrets.ROBOT_TOKEN || secrets.GITHUB_TOKEN }} @@ -108,7 +108,8 @@ jobs: echo "$out" fi - - name: Run optional checks/linters + - name: Run optional linters + if: github.event_name == 'pull_request' uses: reviewdog/action-golangci-lint@v2 with: github_token: ${{ secrets.ROBOT_TOKEN || secrets.GITHUB_TOKEN }}