From 2505fca8fc0370341b495ff7acf85d0b7ba362bd Mon Sep 17 00:00:00 2001 From: CoreOS Bot Date: Wed, 28 Jan 2026 18:18:53 +0000 Subject: [PATCH] =?UTF-8?q?Sync=20repo=20templates=20=E2=9A=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sync with coreos/repo-templates@e50202b0f0a498d5231972f4caaf8a0985f0b3cc. --- .github/workflows/go.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 48baa67..def9086 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -24,17 +24,27 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Go 1.x - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: Build run: ./build.sh - name: Test run: ./test.sh + - name: Check Go formatting (gofmt) + shell: bash + run: | + GO_FILES=$(find . -name '*.go' -not -path "./vendor/*") + UNFORMATTED_FILES=$(gofmt -l $GO_FILES) + if [ -n "$UNFORMATTED_FILES" ]; then + echo "Go files are not formatted. Please run 'gofmt -w .' on your code." + gofmt -d $UNFORMATTED_FILES + exit 1 + fi + echo "All Go files are correctly formatted." - name: Run linter - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v8 with: - version: v1.55.1 - args: -E=gofmt --timeout=30m0s + version: v2.6.2