Skip to content

Commit 8c5dc53

Browse files
Add github workflow to keep golang up-to-date
1 parent fcb3492 commit 8c5dc53

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/bump-golang.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Bump Go Version
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 1' # weekly
6+
workflow_dispatch:
7+
8+
jobs:
9+
bump-go-version:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v7
13+
14+
- name: Set up Go
15+
id: setup-go
16+
uses: actions/setup-go@v7
17+
with:
18+
go-version: stable
19+
20+
- name: Bump go directive in go.mod
21+
run: go mod edit -go=${{ steps.setup-go.outputs.go-version }}
22+
23+
- name: Tidy dependencies
24+
run: go mod tidy
25+
26+
- name: Create Pull Request
27+
uses: peter-evans/create-pull-request@v6
28+
with:
29+
title: "chore: bump Go version to ${{ steps.setup-go.outputs.go-version }}"
30+
branch: bump-go-version
31+
body: "Automated PR to bump Go version to `${{ steps.setup-go.outputs.go-version }}` + go mod tidy"

0 commit comments

Comments
 (0)