@@ -3,26 +3,35 @@ name: Bump BBS Protos
3
3
on :
4
4
workflow_dispatch :
5
5
schedule :
6
- - cron : ' 0 0 * * *' # Runs daily, adjust as needed
6
+ - cron : ' 0 0 * * *' # Runs daily at midnight
7
7
8
8
jobs :
9
9
update-protos :
10
10
runs-on : ubuntu-latest
11
11
12
12
steps :
13
+ - uses : hmarr/debug-action@v3
13
14
- name : Checkout ccng
14
- uses : actions/checkout@v3
15
+ uses : actions/checkout@v4
16
+ with :
17
+ path : cloud_controller_ng
15
18
16
19
- name : Clone bbs repository
17
- run : |
18
- git clone --depth=1 https://github.com/cloudfoundry/bbs.git
19
- echo "BBS_REPO_PATH=$(pwd)/bbs" >> $GITHUB_ENV
20
+ uses : actions/checkout@v4
21
+ with :
22
+ repository : cloudfoundry/bbs
23
+ path : bbs
20
24
21
25
- name : Install protoc
22
26
run : |
23
27
wget -q -O /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip
24
- unzip -q /tmp/protoc.zip -d /usr/local
28
+ sudo unzip -q /tmp/protoc.zip -d /usr/local
25
29
rm /tmp/protoc.zip
30
+ wget -q -O /tmp/protobuf.zip https://github.com/protocolbuffers/protobuf/archive/v3.6.1.zip
31
+ unzip -q /tmp/protobuf.zip -d /tmp
32
+ sudo cp -r /tmp/protobuf-3.6.1/src/google /usr/local/include/
33
+ sudo chmod -R 755 /usr/local/include/google
34
+ rm -rf /tmp/protobuf.zip /tmp/protobuf-3.6.1
26
35
export PATH=$PATH:/usr/local/bin
27
36
28
37
- name : Clone gogo/protobuf
34
43
- name : Generate Ruby files from protos
35
44
run : |
36
45
RUBY_OUT=$(mktemp -d)
37
- pushd $BBS_REPO_PATH/models > /dev/null
46
+ pushd bbs > /dev/null
38
47
sed -i'' -e 's/package models/package diego.bbs.models/' models/*.proto
39
48
protoc --proto_path="$PROTO_SRC":models --ruby_out="$RUBY_OUT" models/*.proto
40
49
popd > /dev/null
@@ -67,12 +76,13 @@ jobs:
67
76
if : env.changes == 'true'
68
77
uses : peter-evans/create-pull-request@v7
69
78
with :
70
- branch : bbs-protos
71
- base : main
79
+ path : cloud_controller_ng
80
+ branch : bbs-protos-bump-${{ github.ref_name }}
72
81
title : " Automated Update of BBS Protobuf Resources"
73
82
body : |
74
83
This PR contains updates to the bbs protobuf resources.
75
84
Please review carefully before merging.
76
85
labels : " bump_bbs_protos, needs_review"
77
86
commit-message : " Bump BBS protos"
87
+ committer :
" ari-wg-gitbot <[email protected] >"
78
88
author :
" ari-wg-gitbot <[email protected] >"
0 commit comments