Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use buf-action in CI #115

Merged
merged 5 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/buf-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Buf CI
on:
push:
pull_request:
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:
token: ${{ secrets.BUF_TOKEN }}
version: 1.32.2
45 changes: 0 additions & 45 deletions .github/workflows/buf.yaml

This file was deleted.

9 changes: 2 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,8 @@ jobs:
- name: install
uses: actions/setup-go@v5
with:
go-version: 1.21.x
- name: cache
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-registry-proto-ci-${{ hashFiles('**/Makefile') }}
restore-keys: ${{ runner.os }}-registry-proto-ci-
go-version: 1.22.x
cache-dependency-path: Makefile
- name: make
run: make
- name: make checkgenerate
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ BIN := .tmp/bin
export PATH := $(BIN):$(PATH)
export GOBIN := $(abspath $(BIN))

BUF_VERSION := v1.32.0-beta.1
BUF_VERSION := 1.32.2
COPYRIGHT_YEARS := 2023-2024

.PHONY: help
Expand Down Expand Up @@ -56,8 +56,8 @@ checkgenerate:

$(BIN)/buf: Makefile
@mkdir -p $(@D)
go install github.com/bufbuild/buf/cmd/buf@$(BUF_VERSION)
go install github.com/bufbuild/buf/cmd/buf@v$(BUF_VERSION)

$(BIN)/license-header: Makefile
@mkdir -p $(@D)
go install github.com/bufbuild/buf/private/pkg/licenseheader/cmd/license-header@$(BUF_VERSION)
go install github.com/bufbuild/buf/private/pkg/licenseheader/cmd/license-header@v$(BUF_VERSION)