Skip to content

.github: Bump golangci/golangci-lint-action from 3 to 4 #17

.github: Bump golangci/golangci-lint-action from 3 to 4

.github: Bump golangci/golangci-lint-action from 3 to 4 #17

Workflow file for this run

name: buf
on:
push:
branches: [ main ]
pull_request:
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1
- uses: bufbuild/buf-lint-action@v1
with:
input: 'proto'
# We need to fetch main so we can compare breaking changes against whatever is in main right now.
- name: Fetch origin/main
run: git fetch --no-tags --prune --depth=1 origin +refs/heads/main:refs/remotes/origin/main
- uses: bufbuild/buf-breaking-action@v1
with:
input: 'proto'
against: '.git#branch=origin/main,subdir=proto'
# Push buf module to the buf schema registry, but only if the validate action succeeded and if the action is running
# on branch main.
push:
runs-on: ubuntu-latest
needs: validate
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1
- uses: bufbuild/buf-push-action@v1
with:
input: 'proto'
buf_token: ${{ secrets.BUF_TOKEN }}