From 69e455dd0843493eb61cb659d83bd4360e0d5f84 Mon Sep 17 00:00:00 2001 From: Edward McFarlane Date: Wed, 5 Jun 2024 18:36:17 -0400 Subject: [PATCH 1/8] Use buf-action in CI --- .github/workflows/buf-ci.yaml | 22 ++++++++++++++++++ .github/workflows/buf.yaml | 42 ----------------------------------- 2 files changed, 22 insertions(+), 42 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 0000000000..c5504797bc --- /dev/null +++ b/.github/workflows/buf-ci.yaml @@ -0,0 +1,22 @@ +name: Buf CI +on: + push: + paths: + - 'proto/**' + pull_request: + paths: + - 'proto/**' + 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 ffc8a7f9a1..0000000000 --- a/.github/workflows/buf.yaml +++ /dev/null @@ -1,42 +0,0 @@ -name: buf -on: - push: - paths: - - 'proto/**' -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: bufbuild/buf-setup-action@v1.32.2 - with: - github_token: ${{ github.token }} - - uses: bufbuild/buf-lint-action@v1.1.1 - with: - buf_token: ${{ secrets.BUF_TOKEN }} - breaking: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: bufbuild/buf-setup-action@v1.32.2 - with: - github_token: ${{ github.token }} - - uses: bufbuild/buf-breaking-action@v1.1.4 - with: - against: buf.build/bufbuild/buf - buf_token: ${{ secrets.BUF_TOKEN }} - push: - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' - needs: - - lint - - breaking - steps: - - uses: actions/checkout@v4 - - uses: bufbuild/buf-setup-action@v1.32.2 - with: - github_token: ${{ github.token }} - - uses: bufbuild/buf-push-action@v1.2.0 - with: - input: 'proto' - buf_token: ${{ secrets.BUF_TOKEN }} From 0acf74b465d1a814721a48b09fd23015d1a21f6e Mon Sep 17 00:00:00 2001 From: Edward McFarlane Date: Mon, 10 Jun 2024 13:21:10 -0400 Subject: [PATCH 2/8] Drop explicit version, use latest --- .github/workflows/buf-ci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/buf-ci.yaml b/.github/workflows/buf-ci.yaml index c5504797bc..91bcba29d7 100644 --- a/.github/workflows/buf-ci.yaml +++ b/.github/workflows/buf-ci.yaml @@ -18,5 +18,4 @@ jobs: - uses: actions/checkout@v4 - uses: bufbuild/buf-action@v0.1 with: - version: "1.32.2" token: ${{ secrets.BUF_TOKEN }} From 6c4685ed9c192d69543f7ee99a910fa72fe85b5f Mon Sep 17 00:00:00 2001 From: Edward McFarlane Date: Mon, 10 Jun 2024 14:56:50 -0400 Subject: [PATCH 3/8] Add workflow as trigger --- .github/workflows/buf-ci.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/buf-ci.yaml b/.github/workflows/buf-ci.yaml index 91bcba29d7..400a74ac79 100644 --- a/.github/workflows/buf-ci.yaml +++ b/.github/workflows/buf-ci.yaml @@ -3,9 +3,11 @@ 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: From 099b926e5192ae243d3efb77314882a23e013a4d Mon Sep 17 00:00:00 2001 From: Edward McFarlane Date: Mon, 10 Jun 2024 17:45:42 -0400 Subject: [PATCH 4/8] Fix trigger coverage --- .github/workflows/buf-ci.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/buf-ci.yaml b/.github/workflows/buf-ci.yaml index 400a74ac79..c8e79d5460 100644 --- a/.github/workflows/buf-ci.yaml +++ b/.github/workflows/buf-ci.yaml @@ -2,10 +2,16 @@ name: Buf CI on: push: paths: + - buf.yaml + - LICENSE + - README.md - 'proto/**' - '.github/workflows/buf-ci.yaml' pull_request: paths: + - buf.yaml + - LICENSE + - README.md - 'proto/**' - '.github/workflows/buf-ci.yaml' types: [opened, synchronize, reopened, labeled, unlabeled] From 43337fbb1b2e336b6265f80a78d032e859af6f01 Mon Sep 17 00:00:00 2001 From: Edward McFarlane Date: Mon, 10 Jun 2024 17:56:15 -0400 Subject: [PATCH 5/8] Add on buf.lock --- .github/workflows/buf-ci.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/buf-ci.yaml b/.github/workflows/buf-ci.yaml index c8e79d5460..f7515b194a 100644 --- a/.github/workflows/buf-ci.yaml +++ b/.github/workflows/buf-ci.yaml @@ -3,6 +3,7 @@ on: push: paths: - buf.yaml + - buf.lock - LICENSE - README.md - 'proto/**' @@ -10,6 +11,7 @@ on: pull_request: paths: - buf.yaml + - buf.lock - LICENSE - README.md - 'proto/**' From 4c756c727c8dbdc8a3bc0b3c2b5a37777742fbc4 Mon Sep 17 00:00:00 2001 From: Edward McFarlane Date: Tue, 11 Jun 2024 17:27:39 -0400 Subject: [PATCH 6/8] Fix triggers LICENSE is covered by proto/** and README.md doesn't affect module. --- .github/workflows/buf-ci.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/buf-ci.yaml b/.github/workflows/buf-ci.yaml index f7515b194a..3e2fdb25a9 100644 --- a/.github/workflows/buf-ci.yaml +++ b/.github/workflows/buf-ci.yaml @@ -4,16 +4,12 @@ on: paths: - buf.yaml - buf.lock - - LICENSE - - README.md - 'proto/**' - '.github/workflows/buf-ci.yaml' pull_request: paths: - buf.yaml - buf.lock - - LICENSE - - README.md - 'proto/**' - '.github/workflows/buf-ci.yaml' types: [opened, synchronize, reopened, labeled, unlabeled] From d7f6a18804284632c3933a2fab88e7e55f759d40 Mon Sep 17 00:00:00 2001 From: Edward McFarlane Date: Wed, 26 Jun 2024 18:17:10 -0400 Subject: [PATCH 7/8] Add back README and LICENSE --- .github/workflows/buf-ci.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/buf-ci.yaml b/.github/workflows/buf-ci.yaml index 3e2fdb25a9..7b5e7d94aa 100644 --- a/.github/workflows/buf-ci.yaml +++ b/.github/workflows/buf-ci.yaml @@ -4,12 +4,16 @@ on: 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] From a571e88fb30f6d19e96cf83b32fccadb6d85f479 Mon Sep 17 00:00:00 2001 From: Edward McFarlane Date: Thu, 27 Jun 2024 14:18:22 -0400 Subject: [PATCH 8/8] Match example --- .github/workflows/buf-ci.yaml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/buf-ci.yaml b/.github/workflows/buf-ci.yaml index 7b5e7d94aa..9e412a126d 100644 --- a/.github/workflows/buf-ci.yaml +++ b/.github/workflows/buf-ci.yaml @@ -1,21 +1,7 @@ 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: @@ -28,4 +14,5 @@ jobs: - uses: actions/checkout@v4 - uses: bufbuild/buf-action@v0.1 with: + username: ${{ secrets.BUF_USERNAME }} token: ${{ secrets.BUF_TOKEN }}