Skip to content

build(deps): bump github/codeql-action from 3.28.17 to 3.28.18 in the github-actions group #370

build(deps): bump github/codeql-action from 3.28.17 to 3.28.18 in the github-actions group

build(deps): bump github/codeql-action from 3.28.17 to 3.28.18 in the github-actions group #370

Workflow file for this run

name: Lint and fmt
on:
pull_request:
paths-ignore:
- "**.md"
- "**.jpg"
- "**.png"
- "**.gif"
- "**.svg"
- "CODEOWNERS"
permissions:
contents: read
# Abort prior jobs in the same workflow / PR
concurrency:
group: lint-${{ github.ref }}
cancel-in-progress: true
jobs:
detect-modules:
runs-on: ubuntu-latest
outputs:
modules: ${{ steps.set-modules.outputs.modules }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install tools
uses: ./.github/actions/install-tools
- id: set-modules
run: |
MODULES_JSON=$(find . -mindepth 2 -maxdepth 4 -type f -name 'go.mod' | cut -c 3- | sed 's|/go.mod$||' | sort -u | jq -R . | jq -c -s . || echo "[\".\"]")
echo "modules=$MODULES_JSON" >> $GITHUB_OUTPUT
echo "Found modules: $MODULES_JSON"
health-checks:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: ensure all modules are on the same go version
run: make check-go-version-consistency
- run: |
make readme
if ! git diff --exit-code README.md; then
echo "README.md is dirty. Please run 'make readme' and commit the changes"
exit 1
fi
lint:
needs: detect-modules
runs-on: ubuntu-latest
strategy:
matrix:
modules: ${{ fromJSON(needs.detect-modules.outputs.modules) }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install tools
uses: ./.github/actions/install-tools
- name: golangci-lint ${{ matrix.modules }}
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
working-directory: ${{ matrix.modules }}