-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (39 loc) · 1.08 KB
/
merged.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
name: push main
on:
pull_request:
branches:
- main
types: [closed]
jobs:
update_version:
runs-on: ubuntu-20.04
if: github.event.pull_request.merged == true
timeout-minutes: 10
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: install packages
run: >-
python -m pip install -r proto/requirements.txt
- name: protobuf build
run: |
cd proto
make
- name: update .proto_hash
run: |
cd proto
proto_hash=$(python3 proto_hash.py)
if [ ${proto_hash} != $(cat .proto_hash) ]; then
echo ${proto_hash} > .proto_hash
python3 increment_minor.py $(cat .version) > .version
fi
make clean
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: update otaclient_pb2 hash and version
file_pattern: ':/proto/.version :/proto/.proto_hash'
branch: main