Skip to content

Commit bd38716

Browse files
authored
Fix update-protos workflow (#521)
1 parent b104774 commit bd38716

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

.github/workflows/update_protos.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@ on:
99
jobs:
1010
update-protos:
1111
if: github.repository_owner == 'viamrobotics'
12-
runs-on: [self-hosted, x64]
13-
container:
14-
image: ghcr.io/viamrobotics/canon:amd64
12+
runs-on: ubuntu-latest
1513
steps:
16-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1715
- uses: bufbuild/[email protected]
1816
with:
1917
github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -39,13 +37,13 @@ jobs:
3937
run: make format
4038

4139
- name: Add + Commit + Open PR
42-
uses: peter-evans/[email protected]
43-
with:
44-
commit-message: "[WORKFLOW] Updating protos from ${{ github.event.client_payload.repo_name }}, commit: ${{ github.event.client_payload.sha }}"
45-
branch: "workflow/update-protos"
46-
delete-branch: true
47-
base: main
48-
title: Automated Protos Update
49-
body: This is an auto-generated PR to update proto definitions. Check the commits to see which repos and commits are responsible for the changes
50-
assignees: njooma
51-
reviewers: njooma
40+
shell: bash
41+
run: |
42+
git checkout -b workflow/update-protos || git checkout workflow/update-protos
43+
git add --all
44+
git -c author.name=viambot -c [email protected] -c committer.name=GitHub -c [email protected] commit -m "[WORKFLOW] Updating protos from ${{ github.event.client_payload.repo_name }}, commit: ${{ github.event.client_payload.sha }}"
45+
git -c pull.ff=only pull origin workflow/update-protos || true # do not fail if the branch doesn't exist
46+
git push -f origin workflow/update-protos
47+
gh pr view workflow/update-protos && gh pr reopen workflow/update-protos || gh pr create -B main -H workflow/update-protos -t "Automated Protos Update" -b "This is an auto-generated PR to update proto definitions. Check the commits to see which repos and commits are responsible for the changes" -a viamrobotics/sdk-netcode -r viamrobotics/sdk-netcode
48+
env:
49+
GH_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)