diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6119373c..6f9081bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,3 +69,23 @@ jobs: - if: failure() run: echo "::error::Check failed, please run 'go generate ./...' and commit the changes." + + go-mod-tidy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + + - name: Run go mod tidy + run: go mod tidy + + - name: Check uncommitted changes + run: git diff --exit-code + + - if: failure() + run: echo "::error::Check failed, please run 'go mod tidy' and commit the changes." diff --git a/renovate.json b/renovate.json index 5805c99a..5b7ccc2c 100644 --- a/renovate.json +++ b/renovate.json @@ -1,4 +1,5 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": ["github>hetznercloud/.github//renovate/default"] + "extends": ["github>hetznercloud/.github//renovate/default"], + "postUpdateOptions": ["gomodTidy"] }