clean up workflow file #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 'github-actions@github.com' | |
git commit -am "${{ github.event.head_commit.message }}" | |
git remote add target git@github.com:rosflight/mavlink_c_library.git | |
git push target --all |