From e58a5cec369d4e1bb812a58265888c71a3282572 Mon Sep 17 00:00:00 2001 From: Jonathan Marcantonio Date: Thu, 29 Aug 2024 09:22:20 -0400 Subject: [PATCH] RHCLOUD-33054 - Pipeline to sync protos (#26) * Pipeline to sync protos from relations-api Signed-off-by: Jonathan Marcantonio * Allow for manual trigger & run less often Signed-off-by: Jonathan Marcantonio --------- Signed-off-by: Jonathan Marcantonio --- .github/workflows/sync-protos.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/sync-protos.yml diff --git a/.github/workflows/sync-protos.yml b/.github/workflows/sync-protos.yml new file mode 100644 index 0000000..d756033 --- /dev/null +++ b/.github/workflows/sync-protos.yml @@ -0,0 +1,26 @@ +name: sync-protos + +on: + workflow_dispatch: + schedule: + - cron: '0 */6 * * *' # every 6 hours. + + +jobs: + build: + name: Sync protos to clients + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Clone relations-api repo + run: git clone --depth=1 https://github.com/project-kessel/relations-api.git + - name: Copy proto files + run: | + cp -r relations-api/api/kessel/relations/v1/*.proto src/main/proto/kessel/relations/v1/ + cp -r relations-api/api/kessel/relations/v1beta1/*.proto src/main/proto/kessel/relations/v1beta1/ + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: 'Sync updated proto files' + title: Update protos