Skip to content

RSDK-4787: Add Readings to API (#379) #5

RSDK-4787: Add Readings to API (#379)

RSDK-4787: Add Readings to API (#379) #5

name: Tag Version and Update Buf
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
# Triggers the workflow on pushes to the main branch
push:
paths:
- 'proto/**'
branches:
- main
# Allow running this workflow manually from the Actions tab
workflow_dispatch:
jobs:
bump-tag:
if: github.repository_owner == 'viamrobotics'
runs-on: [self-hosted, x64]
container:
image: ghcr.io/viamrobotics/canon:amd64-cache
options: --platform linux/amd64
outputs:
new_tag: ${{ steps.bump.outputs.new_tag }}
steps:
- uses: actions/checkout@v3
- name: Bump tag
id: bump
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.REPO_READ_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch
buf-push:
needs: bump-tag
if: github.repository_owner == 'viamrobotics'
runs-on: [self-hosted, x64]
container:
image: ghcr.io/viamrobotics/canon:amd64-cache
steps:
- uses: actions/checkout@v3
- uses: bufbuild/buf-setup-action@v1
- uses: AdamMagaluk/buf-push-action@v1
with:
input: proto/viam
buf_token: ${{ secrets.BUF_TOKEN }}
tag: ${{needs.bump-tag.outputs.new_tag}}
dispatch:
needs: buf-push
if: github.repository_owner == 'viamrobotics'
runs-on: [self-hosted, x64]
container:
image: ghcr.io/viamrobotics/canon:amd64
strategy:
matrix:
repo:
- viamrobotics/rdk
- viamrobotics/app
- viamrobotics/viam-python-sdk
- viamrobotics/viam-rust-sdk
- viamrobotics/rust-utils
- viamrobotics/viam-cpp-sdk
- viamrobotics/viam-typescript-sdk
- viamrobotics/viam-flutter-sdk
steps:
- name: Notify Proto Watchers
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.REPO_READ_TOKEN }}
repository: ${{ matrix.repo }}
event-type: protos-updated
client-payload: '{"repo_name": "${{github.repository}}", "sha": "${{github.sha}}"}'