github.com/Mrs4s/go-cqhttp@v1.2.0/.github/workflows/golint.yml (about) 1 name: Lint 2 3 on: [push,pull_request,workflow_dispatch] 4 5 jobs: 6 golangci: 7 name: lint 8 runs-on: ubuntu-latest 9 steps: 10 - uses: actions/checkout@v3 11 12 - name: Setup Go environment 13 uses: actions/setup-go@v3 14 with: 15 go-version: '1.20' 16 17 - name: golangci-lint 18 uses: golangci/golangci-lint-action@v3 19 with: 20 version: latest 21 22 - name: Tests 23 run: | 24 go test $(go list ./...) 25 26 - name: Commit back 27 if: ${{ github.repository_owner == 'Mrs4s' && !github.event.pull_request }} 28 continue-on-error: true 29 run: | 30 git config --local user.name 'github-actions[bot]' 31 git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com' 32 git add --all 33 git commit -m "ci(chore): Fix stylings" 34 git push 35 36 - name: Suggester 37 if: ${{ github.event.pull_request }} 38 uses: reviewdog/action-suggester@v1 39 with: 40 github_token: ${{ secrets.GITHUB_TOKEN }} 41 tool_name: golangci-lint