Skip to content

Automate Go version updates via scheduled workflow#21324

Draft
Copilot wants to merge 6 commits intomainfrom
copilot/automate-go-version-updates-again
Draft

Automate Go version updates via scheduled workflow#21324
Copilot wants to merge 6 commits intomainfrom
copilot/automate-go-version-updates-again

Conversation

Copy link
Contributor

Copilot AI commented Feb 13, 2026

Manual Go version updates require tracking releases and updating multiple files with different version format requirements. This workflow automates the process.

Implementation

Workflow: .github/workflows/go-version-update.yml

  • Queries go.dev/dl/?mode=json for latest release
  • Compares against MODULE.bazel version
  • Updates on version mismatch:
    • MODULE.bazelgo_sdk.download(version = "1.26.0")
    • go/extractor/go.modgo 1.26 and toolchain go1.26.0
    • go/extractor/autobuilder/build-environment.gomaxGoVersion = "1.26"
    • go/actions/test/action.ymldefault: "~1.26.0"
  • Creates/updates PR on workflow/go-version-update branch
  • Schedule: Weekly on Mondays at 3 AM UTC

Excluded from automation:

  • go/ql/** - Query-specific code requiring manual review
  • docs/** - Documentation requiring manual updates

Technical Details

  • Uses sed -E for cross-platform regex compatibility (GNU/BSD)
  • Escapes version strings for safe regex patterns
  • Validates API responses and version extraction
  • Deduplicates PRs via branch check
  • Fails fast on malformed data

Example

When Go 1.27.0 releases:

Current: 1.26.0 → Latest: 1.27.0
Updates 4 files → Commits to workflow/go-version-update → Creates PR "Go: Update to 1.27"

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 5 commits February 13, 2026 11:17
Co-authored-by: mbg <278086+mbg@users.noreply.github.com>
Co-authored-by: mbg <278086+mbg@users.noreply.github.com>
Co-authored-by: mbg <278086+mbg@users.noreply.github.com>
Co-authored-by: mbg <278086+mbg@users.noreply.github.com>
Co-authored-by: mbg <278086+mbg@users.noreply.github.com>
Copilot AI changed the title [WIP] Add automation for Go version updates using GitHub Actions Automate Go version updates via scheduled workflow Feb 13, 2026
Copilot AI requested a review from mbg February 13, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants