Skip to content

Commit 8fd5396

Browse files
authored
Merge pull request #16 from CLSFramework/develop
Develop
2 parents 62c726d + 5739bc5 commit 8fd5396

File tree

7 files changed

+743
-3367
lines changed

7 files changed

+743
-3367
lines changed

.github/workflows/grpc-generate.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Generate gRPC Code
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
generate:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
with:
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: '3.x'
22+
23+
- name: Install gRPC tools
24+
run: |
25+
python3 -m pip install --upgrade pip
26+
pip install -r requirements.txt
27+
28+
- name: Run generate.sh
29+
run: |
30+
chmod +x ./generate.sh
31+
./generate.sh
32+
- name: Check for changes
33+
run: |
34+
git config --global user.name "github-actions[bot]"
35+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
36+
git add .
37+
if ! git diff --cached --quiet; then
38+
git commit -m "Automated update: Generated Thrift classes"
39+
else
40+
echo "No changes detected, skipping commit."
41+
fi
42+
- name: Push changes
43+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
44+
run: |
45+
git push origin main
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,5 @@
22
scripts/proxy
33
scripts/rcssserver
44
logs/
5-
__pycache__/check_requirements.cpython-310.pyc
6-
__pycache__/service_pb2_grpc.cpython-310.pyc
7-
__pycache__/service_pb2.cpython-310.pyc
8-
utils/__pycache__/__init__.cpython-310.pyc
9-
utils/__pycache__/logger_utils.cpython-310.pyc
5+
__pycache__/
6+
utils/__pycache__/

0 commit comments

Comments
 (0)