Skip to content

[pull] main from kubeflow:main #10273

[pull] main from kubeflow:main

[pull] main from kubeflow:main #10273

name: Go Mod Tidy Diff Check
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions: # set contents: read at top-level, per OpenSSF ScoreCard rule TokenPermissionsID
contents: read
jobs:
tidy-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.24'
- name: Cache Go modules
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run go mod tidy and check for changes
run: |
go mod tidy
git diff --exit-code go.mod go.sum