Sync proto file from Control core #1031
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |