mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Bump every GitHub Action in the repository to its latest major version, addressing the upcoming Node.js 20 deprecation. Several of the old versions (checkout v4, cache v4, setup-node v4, labeler v5) use the Node 20 runtime which GitHub is deprecating. The new versions use Node 22. - actions/checkout v4/v5 to v6 - actions/upload-artifact v4 to v7 - actions/download-artifact v4 to v8 - actions/cache, cache/restore, cache/save v4 to v5 - actions/setup-node v4 to v6 - actions/setup-python v5 to v6 - actions/github-script v7/v8 to v9 - actions/labeler v5 to v6 - peter-evans/find-comment v3 to v4 - dorny/paths-filter v3 to v4 - codecov/codecov-action v4 to v6 - docker/setup-buildx-action v3 to v4 - docker/build-push-action v6 to v7 - tj-actions/changed-files v46 to v47 Signed-off-by: Ramon Roche <mrpollo@gmail.com>
63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
name: Sync ROS 2 messages to px4_msgs
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
- 'stable'
|
|
- 'beta'
|
|
- 'release/**'
|
|
paths:
|
|
- 'msg/**'
|
|
- 'srv/**'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
sync_to_px4_msgs:
|
|
if: github.repository == 'PX4/PX4-Autopilot'
|
|
runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
|
steps:
|
|
- name: Checkout PX4 repo
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup git credentials
|
|
run: |
|
|
git config --global user.name "${{ secrets.PX4BUILDBOT_USER }}"
|
|
git config --global user.email "${{ secrets.PX4BUILDBOT_EMAIL }}"
|
|
|
|
- name: Clone PX4_msgs repo
|
|
run: |
|
|
git clone https://${{ secrets.PX4BUILTBOT_PERSONAL_ACCESS_TOKEN }}@github.com/PX4/px4_msgs.git
|
|
|
|
- name: Check out the same branch as the PX4 repo
|
|
run: |
|
|
cd px4_msgs
|
|
if git checkout ${{ github.ref_name }}; then
|
|
echo "Checked out existing branch"
|
|
else
|
|
git checkout -b ${{ github.ref_name }}
|
|
fi
|
|
|
|
- name: Copy ROS 2 messages
|
|
run: |
|
|
rm -f px4_msgs/msg/*.msg
|
|
rm -f px4_msgs/msg/versioned/*.msg
|
|
rm -f px4_msgs/srv/*.srv
|
|
rm -f px4_msgs/srv/versioned/*.srv
|
|
cp msg/*.msg px4_msgs/msg/
|
|
cp msg/versioned/*.msg px4_msgs/msg/ || true
|
|
cp srv/*.srv px4_msgs/srv/
|
|
cp srv/versioned/*.srv px4_msgs/srv/ || true
|
|
|
|
- name: Commit and push changes
|
|
run: |
|
|
cd px4_msgs
|
|
git status
|
|
git add .
|
|
git commit -a -m "Update to PX4 ${{ github.sha }}" || true
|
|
git push origin ${{ github.ref_name }} || true
|
|
cd ..
|
|
rm -rf px4_msgs
|