name: golangci-lint
on:
  # Triggers the workflow on push or pull request events but only for the main branch
  push:
    branches: 
      - main
      - release-branch-*
  pull_request:
    branches:
      - '*'
permissions:
  contents: read
  pull-requests: read
jobs:
  golangci:
    name: lint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/setup-go@v2
      - uses: actions/checkout@v2
      - name: golangci-lint
        uses: golangci/golangci-lint-action@v2
        with:
          version: v1.45.2
          args: --timeout 9m
          only-new-issues: true
