-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (40 loc) · 1.34 KB
/
bump_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
name: Bump Versions
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
schedule:
- cron: '30 17 * * WED' # 12:30 EST on wednesdays
workflow_dispatch:
jobs:
bump-versions:
name: Bump Package Versions
if: github.repository_owner == 'viam-modules'
runs-on: ubuntu-latest
container:
image: ghcr.io/viamrobotics/rdk-devenv:amd64
timeout-minutes: 10
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Update go dependencies
id: gobump
run: |
sudo chown -R testbot .
sudo -u testbot bash -lc 'go get go.viam.com/rdk'
sudo -u testbot bash -lc 'go get go.viam.com/api'
sudo -u testbot bash -lc 'go mod tidy'
GEN_DIFF=$(git status -s)
if [ -n "$GEN_DIFF" ]; then
echo "needs_pr=1" >> $GITHUB_OUTPUT
fi
- name: Add + Commit + Open PR
if: steps.gobump.outputs.needs_pr == 1
uses: peter-evans/create-pull-request@v5
with:
commit-message: '[WORKFLOW] Updating go dependencies'
branch: 'workflow/update-dependencies'
delete-branch: true
base: main
title: Automated Go Dependencies Update
body: This is an auto-generated PR to update go dependencies. Please confirm tests are passing before merging.