Skip to content

Update proto files

Update proto files #51

Workflow file for this run

name: "JSON Schemas"
on:
push:
paths:
- 'models.proto'
branches:
- main
workflow_dispatch:
jobs:
json-schemas:
runs-on: ubuntu-latest
steps:
- name: Clone any-block
uses: actions/checkout@v3
with:
repository: anyproto/any-block
token: ${{ secrets.ANY_CLA_TOKEN }}
# install go, protoc, and https://github.com/chrusty/protoc-gen-jsonschema
- name: Install go
uses: actions/setup-go@v4
with:
go-version: '1.19'
- name: Install protoc
run: |
sudo apt-get update && sudo apt-get install -y protobuf-compiler
- name: Install protoc-gen-jsonschema
run: |
go install github.com/chrusty/protoc-gen-jsonschema/cmd/protoc-gen-jsonschema@latest
# generate json schemas
- name: Generate JSON Schemas
run: |
mkdir -p json
mkdir -p json/models
protoc --jsonschema_out=./json/models --proto_path=. models.proto
# commit and push changes
- name: Commit and push changes
run: |
git config --global user.email "[email protected]"
git config --global user.name "Any Association"
git add .
git commit -m "Update JSON schemas"
git push origin main