1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-14 12:40:13 +01:00

[ticket/17396] Only try pushing if merge was successful

PHPBB-17396
This commit is contained in:
Marc Alexander 2024-09-18 20:41:03 +02:00
parent b574a0294c
commit 17d066a980
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -35,11 +35,18 @@ jobs:
run: git fetch --all
- name: Merge 3.3.x into master
# First checkout 3.3.x and master to track from origin, then try merging to master
run: |
git checkout 3.3.x
git checkout master
git merge --no-ff 3.3.x
if git merge --no-ff 3.3.x; then
echo "merge_failed=false" >> $GITHUB_ENV
else
echo "merge_failed=true" >> $GITHUB_ENV
fi
- name: Push changes to master
- name: Push changes to master if merge was successful
if: env.merge_failed == 'false'
run: git push origin master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}