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@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4 with: egress-policy: audit - name: Checkout Repo uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: fetch-depth: 0 persist-credentials: false - name: Setup Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: cache: true cache-dependency-path: "**/go.sum" go-version-file: go.mod - name: Run golangci-lint uses: golangci/golangci-lint-action@82606bf257cbaff209d206a39f5134f0cfbfd2ee # v9.2.1 with: args: --timeout=5m --config=build/golangci-lint/golangci.yaml only-new-issues: true