mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-25 16:51:16 +08:00
ci(px4_msgs): fail the sync when the push to px4_msgs fails (#29520)
Signed-off-by: Michael Fritsche <frimi999@gmail.com>
This commit is contained in:
1 parent
d4d6430319
commit
f94f879184
1 file changed
+12
-2
@@ -52,11 +52,21 @@ jobs:
|
||||
cp srv/versioned/*.srv px4_msgs/srv/ || true
|
||||
|
||||
- name: Commit and push changes
|
||||
shell: bash
|
||||
env:
|
||||
# fail on a rejected token instead of prompting for a username
|
||||
GIT_TERMINAL_PROMPT: 0
|
||||
run: |
|
||||
set -euo pipefail
|
||||
cd px4_msgs
|
||||
git status
|
||||
git add .
|
||||
git commit -a -m "Update to PX4 ${{ github.sha }}" || true
|
||||
git push origin ${{ github.ref_name }} || true
|
||||
if git diff --cached --quiet; then
|
||||
echo "No message changes to commit"
|
||||
else
|
||||
git commit -m "Update to PX4 ${{ github.sha }}"
|
||||
fi
|
||||
# push even without a new commit, so a bad token or a new branch never goes unnoticed
|
||||
git push origin ${{ github.ref_name }}
|
||||
cd ..
|
||||
rm -rf px4_msgs
|
||||
Reference in new issue
Block a user