-
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.35 KB
/
go-update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: 🐹 Go Update
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
Go-Update:
runs-on: Ubuntu-Latest
steps:
- name: 🚚 Checkout Repository
uses: actions/checkout@v4
- name: 🐹 Get the Latest Go Version
id: go
run: |
version="$(curl "https://go.dev/VERSION?m=text" | head -n 1)"
echo "version=${version#go}" | tee -a "$GITHUB_OUTPUT"
- name: 📋 Find and Replace the Gum Version
id: find-replace
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "go [0-9]+.[0-9]+.[0-9]+"
replace: "go ${{ steps.go.outputs.version }}"
include: "go.mod"
- name: 🎈 Create Pull Request
if: ${{ steps.find-replace.outputs.modifiedFiles > 0 }}
uses: peter-evans/create-pull-request@v6
with:
commit-message: |
chore(setup): Version up Go
Change Go version to v${{ steps.go.outputs.version }}.
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
branch: bump-go
title: |
chore(deps): Bump Go version to ${{ steps.go.outputs.version }}
body: Bumps Go version to ${{ steps.go.outputs.version }}
labels: |
Type: Dependencies