Skip to content

Commit

Permalink
ci: only run buf lint on PRs against main
Browse files Browse the repository at this point in the history
Also ensures we're using the most recent stable version of buf
across all workflows, via the `v1` version specifier.

Closes #3292.

(cherry picked from commit 78a85fd)
  • Loading branch information
conorsch committed Nov 16, 2023
1 parent 37eb94e commit 7f89bf4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/buf-pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: Protobuf
on: pull_request
on:
# Exclude feature branches, only run if the PR is targeting main.
pull_request_target:
types:
- opened
branches:
- "main"
jobs:
lint:
name: Lint protobuf
Expand Down Expand Up @@ -55,7 +61,7 @@ jobs:
toolchain: stable
override: false

- uses: bufbuild/buf-setup-action@v1.27.1
- uses: bufbuild/buf-setup-action@v1
with:
buf_api_token: ${{ secrets.BUF_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 7f89bf4

Please sign in to comment.