-
Notifications
You must be signed in to change notification settings - Fork 16
43 lines (39 loc) · 1.19 KB
/
update-golang-version.yaml
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
name: Auto Update Golang Version
on:
push:
branches:
- main
paths:
- 'Makefile.defs'
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: update golang version
run: |
make update_go_version
if ! test -z "$$(git status --porcelain)"; then
echo "update golang"
echo "RUN_UPDATE=true" >> $GITHUB_ENV
else
echo "no need to update golang version"
echo "RUN_UPDATE=false" >> $GITHUB_ENV
fi
# https://github.com/peter-evans/create-pull-request
- name: Create Pull Request
id: create_pr
if: ${{ env.RUN_UPDATE == 'true' }}
uses: peter-evans/[email protected]
with:
title: "robot Update project owing to updated Golang Version "
commit-message: "robot Update project owing to updated Golang Version "
branch-suffix: timestamp
branch: robot/update_golang
delete-branch: true
base: main
signoff: true
token: ${{ secrets.WELAN_PAT }}
labels: pr/robot_update
reviewers: lou-lan,dcwbq