chore(integration): remove deprecated schemas
field (#522)
#563
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Buf CI | |
on: | |
push: | |
pull_request: | |
paths: | |
- '**.proto' | |
- '**/buf.yaml' | |
- '**/buf.lock' | |
- '**/buf.md' | |
- 'buf.gen.yaml' | |
types: [opened, synchronize, reopened, labeled, unlabeled] | |
permissions: | |
contents: read | |
pull-requests: write | |
jobs: | |
buf: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: bufbuild/buf-action@v1 | |
with: | |
token: ${{ secrets.botBufToken }} | |
gen-buf-protogen-go: | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
needs: buf | |
steps: | |
- uses: bufbuild/buf-setup-action@v1 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19 | |
- name: Checkout protobuf repository | |
uses: actions/checkout@v3 | |
- name: Checkout protogen-go repository | |
uses: actions/checkout@v3 | |
with: | |
repository: instill-ai/protogen-go | |
path: ./protogen-go | |
token: ${{ secrets.botGitHubToken }} | |
- name: Import GPG Key | |
uses: crazy-max/ghaction-import-gpg@v5 | |
with: | |
gpg_private_key: ${{ secrets.botGPGPrivateKey }} | |
passphrase: ${{ secrets.botGPGPassphrase }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
git_tag_gpgsign: true | |
workdir: ./protogen-go | |
- name: Generate Go/gRPC/gRPC-Gateway client and server stubs, and commit to protogen-go repository | |
run: | | |
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest | |
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest | |
buf generate | |
cwd=$(pwd) && cd gen/go && ls -d */ | xargs -I{} rm -rf $cwd/protogen-go/{} && cd $cwd | |
cp -r gen/go/* protogen-go/ | |
cd protogen-go | |
if [[ `git status --porcelain` ]]; then | |
git add * | |
git commit -S -m "chore: auto-gen by protobufs" -m "triggered by commit: https://github.com/instill-ai/protobufs/commit/${GITHUB_SHA}" | |
git push | |
fi | |
gen-buf-protogen-python: | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
needs: buf | |
steps: | |
- uses: bufbuild/buf-setup-action@v1 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19 | |
- name: Checkout protobuf repository | |
uses: actions/checkout@v3 | |
- name: Checkout protogen-python repository | |
uses: actions/checkout@v3 | |
with: | |
repository: instill-ai/protogen-python | |
path: ./protogen-python | |
token: ${{ secrets.botGitHubToken }} | |
- name: Import GPG Key | |
uses: crazy-max/ghaction-import-gpg@v5 | |
with: | |
gpg_private_key: ${{ secrets.botGPGPrivateKey }} | |
passphrase: ${{ secrets.botGPGPassphrase }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
git_tag_gpgsign: true | |
workdir: ./protogen-python | |
- name: Generate Go/gRPC client and server stubs, and commit to protogen-python repository | |
run: | | |
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest | |
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest | |
buf generate | |
cwd=$(pwd) && cd gen/python && ls -d */ | xargs -I{} rm -rf $cwd/protogen-python/{} && cd $cwd | |
cp -r gen/python/* protogen-python/ | |
cd protogen-python | |
if [[ `git status --porcelain` ]]; then | |
git add * | |
git commit -S -m "chore: auto-gen by protobufs" -m "triggered by commit: https://github.com/instill-ai/protobufs/commit/${GITHUB_SHA}" | |
git push | |
fi |