-
Notifications
You must be signed in to change notification settings - Fork 13
35 lines (33 loc) · 1.2 KB
/
proto-sync.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
name: Sync proto file from Control core
on:
schedule:
- cron: '0 7 * * 1-5'
workflow_dispatch:
jobs:
check-proto-changes:
name: Create a PR in WebUI repo with updated proto file
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Copy new proto file(s)
run: |
git clone https://github.com/AliceO2Group/Control.git aliecs
cp aliecs/core/protos/o2control.proto Control/protobuf
cp aliecs/apricot/protos/apricot.proto Control/protobuf/o2apricot.proto
rm -rf aliecs
- name: Check if there are any differences and create PR
run: |
is_different="$(git diff --name-only)"
if [ ! -z "$is_different" ]; then
git config user.name github-actions
git config user.email [email protected]
git checkout -B deps/control-protos-changed
git add .
git commit -m "Update PROTO files from AliECS"
git push origin deps/control-protos-changed
gh pr create -t "Update PROTO files from AliECS" -b "Update PROTO files from AliECS" -r "graduta" -l "Control"
fi