name: Run Backend Linter on: push: branches: [main] paths: - "backend/**" pull_request: branches: [main, breaking/**] paths: - "backend/**" permissions: # Required: allow read access to the content for analysis. contents: read # Optional: allow read access to pull request. Use with `only-new-issues` option. pull-requests: read # Optional: allow write access to checks to allow the action to annotate code in the PR. checks: write jobs: golangci-lint: name: Run Golangci-lint runs-on: depot-ubuntu-latest steps: - name: Checkout code uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Go uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version-file: backend/go.mod - name: Run Golangci-lint uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0 with: version: v2.13.2 args: --config=.golangci.yml working-directory: backend only-new-issues: ${{ github.event_name == 'pull_request' }}