Skip to content

fix update protos #894

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 24 additions & 17 deletions .github/workflows/update_protos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Update Protos + Open PR

on:
workflow_dispatch:
pull_request:
repository_dispatch:
types:
- protos-updated
Expand All @@ -12,8 +13,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.REPO_READ_TOKEN }}
#with:
#token: ${{ secrets.REPO_READ_TOKEN }}
- uses: bufbuild/buf-setup-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -35,8 +36,8 @@ jobs:

- name: Store API version
run: |
uv run python3 etc/_update_version_metadata.py src/viam/version_metadata.py ${{ github.event.client_payload.tag }}
echo "Updated API version to ${{ github.event.client_payload.tag }} in src/viam/version_metadata.py"
uv run python3 etc/_update_version_metadata.py src/viam/version_metadata.py v0.1.425
echo "Updated API version to v0.1.425 in src/viam/version_metadata.py"

- name: Generate buf
run: uv run make buf
Expand All @@ -46,6 +47,12 @@ jobs:
- name: Format
run: uv run make format

- name: Print Info
run: |
git status
git remote prune origin
git status

- name: Add + Commit + Open PR
id: cpr
uses: peter-evans/create-pull-request@v7
Expand All @@ -58,7 +65,7 @@ jobs:
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
assignees: njooma
reviewers: njooma
token: ${{ secrets.GIT_ACCESS_TOKEN }}
#token: ${{ secrets.GIT_ACCESS_TOKEN }}

- name: Enable Pull Request Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
Expand All @@ -79,15 +86,15 @@ jobs:
# merging will start to work.
GH_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}

- name: Notify slack of failure
uses: slackapi/[email protected]
if: ${{ failure() }}
with:
payload: |
{
"text": "Python SDK update protos job has failed",
"username": "Python SDK",
"icon_url": "https://media.tenor.com/bZMubztJxGkAAAAe/charlie-brown-walking-charlie-brown.png"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TEAM_SDK_WEBHOOK_URL }}
#- name: Notify slack of failure
#uses: slackapi/[email protected]
#if: ${{ failure() }}
#with:
#payload: |
#{
#"text": "Python SDK update protos job has failed",
#"username": "Python SDK",
#"icon_url": "https://media.tenor.com/bZMubztJxGkAAAAe/charlie-brown-walking-charlie-brown.png"
#}
#env:
#SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TEAM_SDK_WEBHOOK_URL }}
Loading