diff --git a/.github/workflows/bump-go.yml b/.github/workflows/bump-go.yml index 62079a350f9..047be29476d 100644 --- a/.github/workflows/bump-go.yml +++ b/.github/workflows/bump-go.yml @@ -18,5 +18,6 @@ jobs: GIT_AUTHOR_NAME: cli automation GIT_COMMITTER_EMAIL: noreply@github.com GIT_AUTHOR_EMAIL: noreply@github.com + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | bash .github/workflows/scripts/bump-go.sh --apply go.mod diff --git a/.github/workflows/scripts/bump-go.sh b/.github/workflows/scripts/bump-go.sh index 74f5b3cbe1c..812b9041766 100755 --- a/.github/workflows/scripts/bump-go.sh +++ b/.github/workflows/scripts/bump-go.sh @@ -76,6 +76,9 @@ if [[ "$CURRENT_TOOLCHAIN_DIRECTIVE" != "go$TOOLCHAIN_VERSION" ]]; then echo " • toolchain $CURRENT_TOOLCHAIN_DIRECTIVE → go$TOOLCHAIN_VERSION" fi +# ---- Run go mod tidy to ensure .0 minor version is added to go directive ---- +go mod tidy + rm -f "$GO_MOD.bak" git add "$GO_MOD"