Skip to content

APP-6153 add token to StartBuild for private checkout (#561) #9

APP-6153 add token to StartBuild for private checkout (#561)

APP-6153 add token to StartBuild for private checkout (#561) #9

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: ubuntu-latest
container: ghcr.io/viamrobotics/canon: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: ubuntu-latest
container: ghcr.io/viamrobotics/canon:amd64
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: [bump-tag, buf-push]
if: github.repository_owner == 'viamrobotics'
runs-on: ubuntu-latest
container: 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
- viamrobotics/viam-java-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}}", "tag": "${{needs.bump-tag.outputs.new_tag}}"}'