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

feat: push tapir to Buf schema registry for each new tag #553

Merged
merged 2 commits into from
Jul 5, 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/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,21 @@ jobs:
-H 'Accept: application/vnd.github.everest-preview+json' \
-u ${{ secrets.GO_TAPIR_TOKEN }} \
--data '{"event_type": "publish", "client_payload": { "tag": "'"$RELEASE_TAG"'" }}'


bsr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: bufbuild/buf-setup-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: push
env:
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
run: |
RELEASE_TAG=${GITHUB_REF/refs\/tags\/v/}
echo $RELEASE_TAG
make push
4 changes: 4 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ jobs:
- uses: actions/checkout@v4

- uses: bufbuild/buf-setup-action@v1
with:
harryherbig marked this conversation as resolved.
Show resolved Hide resolved
github_token: ${{ secrets.GITHUB_TOKEN }}

- uses: bufbuild/buf-lint-action@v1

Expand All @@ -106,6 +108,8 @@ jobs:
- uses: actions/checkout@v4

- uses: bufbuild/buf-setup-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- uses: bufbuild/buf-breaking-action@v1
if: always()
Expand Down
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all: generate test fmt lint breaking
all: build generate test fmt lint breaking

TEMPLATE ?= buf.gen.yaml
.PHONY: generate
Expand All @@ -21,6 +21,17 @@ fmt: ## Formats all proto files using https://docs.buf.build/format/style
@echo "+ $@"
@buf format -w

.PHONY: build
build: ## Builds buf image, see https://buf.build/docs/reference/images
@echo "+ $@"
@buf build

LABEL ?=
.PHONY: push
push: build ## Pushes tapir to the buf schema registry, see https://buf.build/docs/bsr/introduction and https://buf.build/docs/bsr/module/publish#pushing-with-labels
@echo "+ $@"
@buf push --git-metadata

.PHONY: test
test: generate ## Runs all tests
@echo "+ $@"
Expand Down
Loading