forked from vitessio/vitess
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (48 loc) · 1.38 KB
/
update_golang_dependencies.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
49
50
51
52
53
54
55
56
name: Update Golang Dependencies
on:
schedule:
- cron: "0 0 1,15 * *" # Runs every month on the 1st and 15th days at midnight UTC
workflow_dispatch:
permissions: read-all
jobs:
update_golang_deps:
if: github.repository == 'vitessio/vitess'
permissions:
contents: write
pull-requests: write
name: Update Golang Dependencies
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21.6
- name: Check out code
uses: actions/checkout@v3
with:
ref: main
- name: Upgrade the Golang Dependencies
id: detect-and-update
run: |
go get -u ./...
output=$(git status -s)
if [ -z "${output}" ]; then
exit 0
fi
go mod tidy
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
branch: "upgrade-go-deps-on-main"
commit-message: "upgrade go deps"
signoff: true
delete-branch: true
title: "Upgrade the Golang Dependencies"
body: |
This Pull Request updates all the Golang dependencies to their latest version using `go get -u ./...`.
base: main
labels: |
go
dependencies
Component: General
Type: Internal Cleanup