forked from mavlink/mavlink
-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (37 loc) · 1.25 KB
/
generate_mavlink_headers.yaml
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
name: Generate Mavlink Headers
on:
push:
branches:
- 'master'
jobs:
generate-headers:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
path: mavlink
- uses: actions/checkout@v4
with:
repository: rosflight/mavlink_c_library
path: mavlink_c_library
ref: 'master'
- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_DEPLOY_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: Install Python2.7
run: sudo apt update && sudo apt install python2.7 -y
- name: Generate message headers
run: |
cd mavlink
python2.7 -m pymavlink.tools.mavgen -o ../mavlink_c_library --lang C message_definitions/v1.0/rosflight.xml
- name: Push message headers to mavlink_c_library
run: |
cd mavlink_c_library
git config user.name 'github-actions'
git config user.email '[email protected]'
git commit -am "${{ github.event.head_commit.message }}"
git remote add target [email protected]:rosflight/mavlink_c_library.git
git push target --all