Skip to content

Separate Modules + Lint MultiNode #15

Separate Modules + Lint MultiNode

Separate Modules + Lint MultiNode #15

Workflow file for this run

name: Golangci-lint
on: [pull_request]
jobs:
golangci-lint:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
actions: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.19'
- name: Find Go modules
id: find-modules
run: |
modules=$(go list -m -json all | jq -r '.Dir')
echo "modules=$modules" >> $GITHUB_ENV
- name: Run golangci-lint for each module
uses: golangci/golangci-lint-action@v3
with:
version: v1.62.2
args: |
for module in ${{ env.modules }}; do
echo "Running golangci-lint in $module"
cd $module
golangci-lint run || exit 1
cd -
done