Skip to content

Commit

Permalink
Use buf-action in CI (#14)
Browse files Browse the repository at this point in the history
This PR updates CI to use the new `buf-action` replacing `buf-setup`,
`buf-lint`, `buf-breaking` and `buf-push` unifying these tasks as one.
The new behaviour is as follows:
- On pull requests: run build, lint, format and breaking change
detection checks.
- On push: build and then push the changes of the latest commit with the
label of the current branch (e.g. main).
- On delete: archive the label associated with the delete (e.g. the
branch name of the PR).

Changes in behaviour:
- Checks no longer block pushes of commits to the BSR.
- Formatting check has been added in addition to lint and breaking.
  • Loading branch information
emcfarlane committed Jun 11, 2024
1 parent c316e96 commit 52dbddf
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 40 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/buf-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Buf CI
on:
push:
paths:
- buf.yaml
- buf.lock
- README.md
- LICENSE
- 'proto/**'
- '.github/workflows/buf-ci.yaml'
pull_request:
paths:
- buf.yaml
- buf.lock
- README.md
- LICENSE
- 'proto/**'
- '.github/workflows/buf-ci.yaml'
types: [opened, synchronize, reopened, labeled, unlabeled]
delete:
permissions:
contents: read
pull-requests: write
jobs:
buf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/[email protected]
with:
version: "1.32.2"
token: ${{ secrets.BUF_TOKEN }}
40 changes: 0 additions & 40 deletions .github/workflows/buf.yaml

This file was deleted.

0 comments on commit 52dbddf

Please sign in to comment.