name: Lint Go on: workflow_dispatch: {} workflow_call: pull_request: branches: [main] paths: - internal/** - pkg/** - shoutrrr/** - go.mod - go.sum - shoutrrr.go permissions: contents: read # Set default read-only permissions jobs: lint: name: Run Golangci-lint runs-on: ubuntu-latest permissions: pull-requests: read steps: - name: Harden the Runner (Step Security) uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0 with: egress-policy: audit - name: Checkout Repo uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 persist-credentials: false - name: Setup Go uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: cache: true cache-dependency-path: "**/go.sum" go-version-file: go.mod - name: Run golangci-lint uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0 with: args: --timeout=5m --config=build/golangci-lint/golangci.yaml only-new-issues: true