Skip to content

Commit

Permalink
ci: fix buf workflow on PRs
Browse files Browse the repository at this point in the history
Follow up to #3292, which incorrectly used `pull_request_target` rather
than `pull_request` to restrict workflow runs to PRs targeting main. We
still want to skip the buf workflows if the PR is targeting a feature
branch.

Closes #3570.
  • Loading branch information
conorsch authored and hdevalence committed Jan 4, 2024
1 parent 8680e83 commit b3204b1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/buf-pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Protobuf
on:
# Exclude feature branches, only run if the PR is targeting main.
pull_request_target:
types:
- opened
pull_request:
branches:
- "main"
jobs:
# Ensure there are no breaking changes to the protocol specs,
# by running the "buf lint" action against the changes in this PR.
lint:
name: Lint protobuf
runs-on: ubuntu-latest
Expand All @@ -16,7 +16,6 @@ jobs:
with:
buf_api_token: ${{ secrets.BUF_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
# input: 'proto'

- uses: bufbuild/buf-lint-action@v1
with:
Expand Down Expand Up @@ -44,10 +43,11 @@ jobs:
# The 'main' branch of the GitHub repository that defines the module.
against: "https://github.com/${GITHUB_REPOSITORY}.git#branch=main,subdir=proto"

# Run our bespoke tooling for codegen, consuming the protocol buffer definitions
# and emitting generated code. Afterward, there should be no uncommitted changes.
protobuf-fresh:
name: Compile protobuf specs to rust code
runs-on: buildjet-16vcpu-ubuntu-2204
# runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v4
Expand Down

0 comments on commit b3204b1

Please sign in to comment.