forked from mavlink/mavlink
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfetch_dialect_ardupilotmega.yml
More file actions
54 lines (48 loc) · 2.03 KB
/
Copy pathfetch_dialect_ardupilotmega.yml
File metadata and controls
54 lines (48 loc) · 2.03 KB
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
52
53
name: Fetch ardupilotmega dialects from downstream
on:
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
copy_and_push:
runs-on: ubuntu-latest
steps:
- name: Checkout this repo
uses: actions/checkout@v7
with:
repository: mavlink/mavlink
- name: Sync ardupilot source file changes(s)
run: |
git remote add ardupilot https://github.com/ArduPilot/mavlink.git
git fetch ardupilot master
git checkout ardupilot/master -- message_definitions/v1.0/ardupilotmega.xml
git checkout ardupilot/master -- message_definitions/v1.0/icarous.xml
git checkout ardupilot/master -- message_definitions/v1.0/csAirLink.xml
git checkout ardupilot/master -- message_definitions/v1.0/loweheiser.xml
git checkout ardupilot/master -- message_definitions/v1.0/uAvionix.xml
git checkout ardupilot/master -- message_definitions/v1.0/cubepilot.xml
- name: Add and check for changes
id: check-changes
run: |
git config --global user.name "${{ secrets.PX4BUILDBOT_USER }}"
git config --global user.email "${{ secrets.PX4BUILDBOT_EMAIL }}"
git add message_definitions/v1.0/*
if git diff --staged --quiet; then
echo "No changes detected"
echo "changes=false" >> $GITHUB_OUTPUT
else
echo "Changes detected"
echo "changes=true" >> $GITHUB_OUTPUT
fi
- name: Commit changes
if: steps.check-changes.outputs.changes == 'true'
run: |
git commit -m "ardupilotmega dialects from ArduPilot/mavlink: $(date)"
- name: Create Pull Request (if changes detected)
if: steps.check-changes.outputs.changes == 'true'
uses: peter-evans/create-pull-request@v8
with:
title: "[BOT] Add ardupilotmega dialects from ArduPilot/mavlink"
body: "ardupilotmega.xml and its included XML copied from the ArduPilot/mavlink repository."
base: master