Skip to content

gha: update to use oidc #607

gha: update to use oidc

gha: update to use oidc #607

Workflow file for this run

---
name: Lint golang
on:
push:
branches: [main]
pull_request:
jobs:
go:
name: Lint go files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- uses: golangci/golangci-lint-action@v4
with:
version: v1.55.2
args: --timeout 5m
- name: Install gofumpt
env:
GOFUMPT_VER: 0.5.0
run: |
mkdir -v -p "$HOME/.local/bin"
wget -O "$HOME/.local/bin/gofumpt" "https://github.com/mvdan/gofumpt/releases/download/v${GOFUMPT_VER}/gofumpt_v${GOFUMPT_VER}_linux_amd64"
chmod 0700 "$HOME/.local/bin/gofumpt"
- name: Run gofumpt
run: |
find . -type f -name '*.go' ! -name '*.pb.go' | xargs -n1 "$HOME/.local/bin/gofumpt" -w -lang=1.21
git diff --exit-code
- name: Tidy go mod
run: |
go mod tidy
git diff --exit-code -- go.mod go.sum