Skip to content

Add version branches to the GitHub workflows #1151

Add version branches to the GitHub workflows

Add version branches to the GitHub workflows #1151

Workflow file for this run

name: golangci-lint
on:
push:
branches:
- '**'
pull_request:
branches:
- main
- 'v[0-9]+'
permissions:
contents: read
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Get go version from go.mod
run: |
echo "GO_VERSION=$(grep '^go ' go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
- name: Setup-go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Pull submodules
run: |
git submodule update --init --recursive
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60.2
args: --timeout=5m