Skip to content

Refactor Buf login command in GitHub Actions workflow to improve toke… #3

Refactor Buf login command in GitHub Actions workflow to improve toke…

Refactor Buf login command in GitHub Actions workflow to improve toke… #3

Workflow file for this run

name: Buf Push
on:
push:
branches:
- master
create:
tags:
- v* # Trigger on tags starting with 'v', adjust if your tags differ
jobs:
buf-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }} # Optional: Recommended for fetching private dependencies
- name: Log in to Buf Schema Registry
run: echo ${{secrets.BUF_TOKEN}} | buf registry login ${{ secrets.BUF_USER }} --token-stdin
- name: Push schema to Buf Schema Registry
run: buf push