fix(handcart): typo from gird to grid #21
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: Generation with Serializers | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
generation: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone 'telemetry-serializers' | |
uses: actions/checkout@v4 | |
with: | |
repository: '${{ github.repository }}' | |
submodules: true | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
cache: 'pip' | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
- name: Print go envs | |
run: go env | |
- name: Install Python requirements | |
run: 'pip install -r lib/serializers/requirements.txt' | |
- name: Install 'protoc' | |
run: | | |
DEBIAN_FRONTEND=noninteractive | |
sudo apt update | |
sudo apt install -y protobuf-compiler | |
# - name: Install protoc 'json-schema' extension | |
# run: | | |
# go install github.com/chrusty/protoc-gen-jsonschema/cmd/protoc-gen-jsonschema@latest | |
- name: Run Serializers files generation | |
working-directory: ./lib/serializers | |
run: python3 src/generator/main.py ../../proto /tmp/generated | |
# - name: Run JSON Schema files generation | |
# working-directory: ./lib/serializers | |
# run: | | |
# ./scripts/generate_schemas /tmp/generated/proto /tmp/generated | |
- name: Change branch to 'build' | |
uses: actions/checkout@v4 | |
with: | |
ref: build | |
- name: Publish generated code on build branch | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git rm -r --ignore-unmatch */* | |
rm -rf * | |
cp -r /tmp/generated/* . | |
git add . | |
if [[ $(git status --porcelain) ]]; then git commit -am "chore: automatically generated files" && git push; fi | |
echo "::set-output name=HASH::$(git rev-parse HEAD)" | |