Skip to content

Commit c1e2a26

Browse files
authored
Improve BBS protos bump worklfow (#4032)
1 parent 677d72c commit c1e2a26

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

.github/workflows/bump_bbs_protos.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,35 @@ name: Bump BBS Protos
33
on:
44
workflow_dispatch:
55
schedule:
6-
- cron: '0 0 * * *' # Runs daily, adjust as needed
6+
- cron: '0 0 * * *' # Runs daily at midnight
77

88
jobs:
99
update-protos:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13+
- uses: hmarr/debug-action@v3
1314
- name: Checkout ccng
14-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
16+
with:
17+
path: cloud_controller_ng
1518

1619
- 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
2024

2125
- name: Install protoc
2226
run: |
2327
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
2529
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
2635
export PATH=$PATH:/usr/local/bin
2736
2837
- name: Clone gogo/protobuf
@@ -34,7 +43,7 @@ jobs:
3443
- name: Generate Ruby files from protos
3544
run: |
3645
RUBY_OUT=$(mktemp -d)
37-
pushd $BBS_REPO_PATH/models > /dev/null
46+
pushd bbs > /dev/null
3847
sed -i'' -e 's/package models/package diego.bbs.models/' models/*.proto
3948
protoc --proto_path="$PROTO_SRC":models --ruby_out="$RUBY_OUT" models/*.proto
4049
popd > /dev/null
@@ -67,12 +76,13 @@ jobs:
6776
if: env.changes == 'true'
6877
uses: peter-evans/create-pull-request@v7
6978
with:
70-
branch: bbs-protos
71-
base: main
79+
path: cloud_controller_ng
80+
branch: bbs-protos-bump-${{ github.ref_name }}
7281
title: "Automated Update of BBS Protobuf Resources"
7382
body: |
7483
This PR contains updates to the bbs protobuf resources.
7584
Please review carefully before merging.
7685
labels: "bump_bbs_protos, needs_review"
7786
commit-message: "Bump BBS protos"
87+
committer: "ari-wg-gitbot <[email protected]>"
7888
author: "ari-wg-gitbot <[email protected]>"

0 commit comments

Comments
 (0)