mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/17396] Only try pushing if merge was successful
PHPBB-17396
This commit is contained in:
parent
b574a0294c
commit
17d066a980
1 changed files with 9 additions and 2 deletions
11
.github/workflows/merge_3.3.x_to_master.yml
vendored
11
.github/workflows/merge_3.3.x_to_master.yml
vendored
|
@ -35,11 +35,18 @@ jobs:
|
||||||
run: git fetch --all
|
run: git fetch --all
|
||||||
|
|
||||||
- name: Merge 3.3.x into master
|
- name: Merge 3.3.x into master
|
||||||
|
# First checkout 3.3.x and master to track from origin, then try merging to master
|
||||||
run: |
|
run: |
|
||||||
|
git checkout 3.3.x
|
||||||
git checkout master
|
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
|
run: git push origin master
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue