From 040fa739b891d2a8784e408f615668373e5c96f0 Mon Sep 17 00:00:00 2001 From: Edward McFarlane Date: Mon, 10 Jun 2024 12:39:27 -0400 Subject: [PATCH 1/2] Use buf-action in CI --- .github/workflows/buf-ci.yaml | 24 +++++++++++++++++++++ .github/workflows/buf.yaml | 40 ----------------------------------- 2 files changed, 24 insertions(+), 40 deletions(-) create mode 100644 .github/workflows/buf-ci.yaml delete mode 100644 .github/workflows/buf.yaml diff --git a/.github/workflows/buf-ci.yaml b/.github/workflows/buf-ci.yaml new file mode 100644 index 0000000..88e01ec --- /dev/null +++ b/.github/workflows/buf-ci.yaml @@ -0,0 +1,24 @@ +name: Buf CI +on: + push: + paths: + - 'proto/**' + - '.github/workflows/buf-ci.yaml' + pull_request: + paths: + - '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/buf-action@v0.1 + with: + version: "1.32.2" + token: ${{ secrets.BUF_TOKEN }} diff --git a/.github/workflows/buf.yaml b/.github/workflows/buf.yaml deleted file mode 100644 index 979e268..0000000 --- a/.github/workflows/buf.yaml +++ /dev/null @@ -1,40 +0,0 @@ -name: buf -on: - push: - paths: - - 'proto/**' - - '.github/workflows/buf.yaml' - workflow_dispatch: -permissions: - contents: read -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: bufbuild/buf-setup-action@v1.32.0-beta.1 - - uses: bufbuild/buf-lint-action@v1 - with: - input: 'proto' - breaking: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: bufbuild/buf-setup-action@v1.32.0-beta.1 - - uses: bufbuild/buf-breaking-action@v1 - with: - input: 'proto' - against: buf.build/bufbuild/knit-demo - push: - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' - needs: - - lint - - breaking - steps: - - uses: actions/checkout@v3 - - uses: bufbuild/buf-setup-action@v1.32.0-beta.1 - - uses: bufbuild/buf-push-action@v1 - with: - input: 'proto' - buf_token: ${{ secrets.BUF_TOKEN }} From a17afe16eb7cf93788470e60cee5218af3e0f0e7 Mon Sep 17 00:00:00 2001 From: Edward McFarlane <3036610+emcfarlane@users.noreply.github.com> Date: Mon, 10 Jun 2024 18:26:52 -0400 Subject: [PATCH 2/2] Update buf-ci.yaml --- .github/workflows/buf-ci.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/buf-ci.yaml b/.github/workflows/buf-ci.yaml index 88e01ec..3cb525f 100644 --- a/.github/workflows/buf-ci.yaml +++ b/.github/workflows/buf-ci.yaml @@ -2,10 +2,18 @@ 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]