Skip to content

Commit f64e2a8

Browse files
committed
Update branch name in generate.yml and add push section
1 parent 8482b49 commit f64e2a8

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

.github/workflows/generate.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: Generate Thrift Code
33
on:
44
push:
55
branches:
6-
- main
6+
- develop
77
pull_request:
88
branches:
9-
- main
9+
- develop
1010

1111
jobs:
1212
generate:
@@ -15,16 +15,28 @@ jobs:
1515
steps:
1616
- name: Checkout code
1717
uses: actions/checkout@v3
18-
19-
- name: Install Thrift
20-
run: sudo apt-get install -y thrift-compiler
2118

2219
- name: Set up Python
2320
uses: actions/setup-python@v4
2421
with:
2522
python-version: '3.x'
2623

24+
- name: Install Thrift
25+
run: |
26+
sudo apt-get install -y thrift-compiler
27+
python3 -m pip install --upgrade pip
28+
pip install -r requirements.txt
29+
2730
- name: Run generate.sh
2831
run: |
2932
chmod +x ./generate.sh
3033
./generate.sh
34+
- name: Commit and push generated files
35+
run: |
36+
git config --global user.name "github-actions[bot]"
37+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
38+
git add .
39+
git commit -m "Automated update: Generated Thrift classes"
40+
git push origin develop
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)