Skip to content

Commit da22a45

Browse files
committed
chore(ci): add workflow to automate Go version updates
Add GitHub Actions workflow using StefMa/Upgrade-Go-Action to automatically check for new Go releases and create PRs to update the go directive in go.mod. This addresses the limitation that Dependabot cannot update the Go version itself (only module dependencies), which means stdlib CVEs that are fixed in newer Go patch releases are not automatically detected. Workflow runs: - Weekly on Mondays at 8am UTC - Manually via workflow_dispatch When a new Go version is available, the action will: 1. Update the go directive in go.mod 2. Run go mod tidy 3. Create a pull request with the changes Related: replicated-collab/git-guardian-kots#287 Dependabot limitation: dependabot/dependabot-core#9527
1 parent e9111ed commit da22a45

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/upgrade-go.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Upgrade Go Version
2+
3+
on:
4+
# Run manually when needed
5+
workflow_dispatch:
6+
# Run weekly on Mondays at 8am UTC
7+
schedule:
8+
- cron: "0 8 * * MON"
9+
10+
jobs:
11+
upgrade-go:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v5
19+
20+
- name: Check for Go updates
21+
uses: StefMa/Upgrade-Go-Action@v1
22+
with:
23+
base-branch: 'main'

0 commit comments

Comments
 (0)