feat: add github actions #16
Workflow file for this run
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: Code Gen Check | |
on: | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
buf-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 | |
with: | |
fetch-depth: 0 | |
- uses: bufbuild/buf-setup-action@9990c72db080fa39cf561230b8d2d7b736681f85 # v1.30.1 | |
with: | |
version: "1.28.1" | |
- uses: bufbuild/buf-lint-action@06f9dd823d873146471cfaaf108a993fe00e5325 # v1.1.1 | |
- uses: bufbuild/buf-breaking-action@c57b3d842a5c3f3b454756ef65305a50a587c5ba # v1.1.4 | |
with: | |
against: main | |
- run: buf format -d --exit-code | |
diff-openapi: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 | |
with: | |
fetch-depth: 0 | |
- uses: bufbuild/buf-setup-action@9990c72db080fa39cf561230b8d2d7b736681f85 # v1.30.1 | |
with: | |
version: "1.28.1" | |
- name: "Generate OpenAPI & Diff" | |
run: | | |
make all | |
git diff --text --exit-code docs/openapiv2/apidocs.swagger.json proto/**/*.go |