Skip to content

correct pr links in release (#45) #137

correct pr links in release (#45)

correct pr links in release (#45) #137

Workflow file for this run

name: lint
on:
push:
branches:
- main
pull_request:
branches:
- main
# - 'release-v*'
env:
GO_VERSION: 1.24.3
GOLANGCI_LINT_VERSION: v2.1.6 # TODO: use v2
jobs:
list-go-modules:
runs-on: ubuntu-24.04
outputs:
modules: ${{ steps.list-go-modules.outputs.modules }}
steps:
- uses: actions/checkout@v4
- name: List go modules
id: list-go-modules
run: |
echo "modules=$(find . -name go.mod -exec dirname {} \; | sort | jq -R -s -c 'split("\n") | map(select(length > 0))')" >> $GITHUB_OUTPUT
go:
runs-on: ubuntu-24.04
needs: list-go-modules
strategy:
fail-fast: false
matrix:
module: ${{ fromJSON(needs.list-go-modules.outputs.modules) }}
steps:
- uses: actions/checkout@v4
- name: golangci-lint
uses: reviewdog/action-golangci-lint@f3dc5fadcaff5d8da3574b129a58db433171b1a8 #v2.1.3
with:
workdir: ${{ matrix.module }}
go_version: ${{ env.GO_VERSION }}
golangci_lint_version: ${{ env.GOLANGCI_LINT_VERSION }}
golangci_lint_flags: --config ${{ github.workspace }}/.golangci.yml
fail_on_error: true # Although this option was deprecated on v2.7.0, it's still available because we use v2.1.3,
# This job is used to check for the branch protection rules.
go-lint-completed:
runs-on: ubuntu-24.04
needs: go
steps:
- run: |
echo completed