Skip to content

support multi-arch builds #27

support multi-arch builds

support multi-arch builds #27

Workflow file for this run

name: Lint
on:
push:
paths:
- "**.go"
- "go.mod"
- "go.sum"
- ".github/workflows/*.yaml"
env:
GO_VERSION: 1.23
jobs:
detect-modules:
runs-on: ubuntu-latest
outputs:
modules: ${{ steps.set-modules.outputs.modules }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- id: set-modules
run: echo "modules=$(go list -m -json | jq -s '.' | jq -c '[.[].Dir]')" >> $GITHUB_OUTPUT
golangci-lint:
needs: detect-modules
runs-on: ubuntu-latest
strategy:
matrix:
modules: ${{ fromJSON(needs.detect-modules.outputs.modules) }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Format
run: |
diff -u <(echo -n) <(gofmt -d -s .)
cd ndc-rest-schema && diff -u <(echo -n) <(gofmt -d -s .)
- name: golangci-lint ${{ matrix.modules }}
uses: golangci/golangci-lint-action@v6
with:
args: --timeout=5m
working-directory: ${{ matrix.modules }}