Skip to content

Add monthly automated Go version update workflow - #414

Closed
Madhan Raj Mookkandy (madhanrm) with Copilot wants to merge 6 commits into
mainfrom
copilot/update-golang-version-monthly
Closed

Add monthly automated Go version update workflow#414
Madhan Raj Mookkandy (madhanrm) with Copilot wants to merge 6 commits into
mainfrom
copilot/update-golang-version-monthly

Conversation

Copilot AI commented Jan 27, 2026

Copy link
Copy Markdown
Contributor

Implements automated monthly checks for new Go releases with PR creation for go.mod updates.

Implementation

  • Schedule: Monthly cron on 1st at 9:00 UTC, manual trigger via workflow_dispatch
  • Version detection: Uses actions/setup-go@v5 with go-version: stable to fetch latest release
  • Comparison logic: Custom semantic version normalization supporting both major.minor and major.minor.patch formats
  • Update mechanism: Modifies go.mod via sed, runs go mod tidy, creates PR with peter-evans/create-pull-request@v7

Version Normalization

Handles version format variations and validates numeric components:

normalize_version() {
  IFS='.' read -ra PARTS <<< "$1"
  local major="${PARTS[0]}" minor="${PARTS[1]}" patch="${PARTS[2]:-0}"
  
  # Validation: format and numeric checks
  [[ -z "$major" || -z "$minor" ]] && return 1
  [[ ! "$major" =~ ^[0-9]+$ ]] && return 1
  
  printf "%05d%05d%05d" "$major" "$minor" "$patch"
}

Comparison uses normalized strings to handle 1.211.21.0 correctly while detecting actual version changes like 1.21.51.22.0.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 5 commits January 27, 2026 00:46
Co-authored-by: madhanrm <20309044+madhanrm@users.noreply.github.com>
Co-authored-by: madhanrm <20309044+madhanrm@users.noreply.github.com>
Co-authored-by: madhanrm <20309044+madhanrm@users.noreply.github.com>
Co-authored-by: madhanrm <20309044+madhanrm@users.noreply.github.com>
Co-authored-by: madhanrm <20309044+madhanrm@users.noreply.github.com>
Copilot AI changed the title [WIP] Create workflow to update Golang version monthly Add monthly automated Go version update workflow Jan 27, 2026
@madhanrm
Madhan Raj Mookkandy (madhanrm) marked this pull request as ready for review January 27, 2026 00:55
@madhanrm

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@madhanrm

Copy link
Copy Markdown
Collaborator

Auto-closing this PR as part of the monthly stale-PR cleanup - it has been open for over 90 days or has had no activity in the last 90 days. This is reversible: reactivate the PR if it is still needed. - automated cleanup on behalf of madhanm

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.

3 participants