-
Notifications
You must be signed in to change notification settings - Fork 19
51 lines (43 loc) · 1.27 KB
/
generate_protos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Generate proto file
on:
push:
branches:
- master
- update_proto/**
paths:
- 'lib/wpc_proto/deps/nanopb/**'
- 'lib/wpc_proto/deps/backend-apis/**'
- 'lib/wpc_proto/proto_options/**'
- '.github/workflows/generate_protos.yml'
- 'lib/wpc_proto/tools/generate_proto_code.sh'
workflow_dispatch:
inputs:
message:
description: 'Commit message'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: install python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: install requirements
run: pip install -r lib/wpc_proto/deps/nanopb/requirements.txt
- name: generate our proto files
run: lib/wpc_proto/tools/generate_proto_code.sh
- name: setup git config
run: |
git config user.name "GitHub Actions"
git config user.email "<>"
- name: commit
run: |
# Stage the file, commit and push
git add lib/wpc_proto/gen/generated_protos/*
git commit --allow-empty -m "Update generated proto files ${message}"
git push origin ${GITHUB_REF}