Skip to content

Commit

Permalink
merge-upstream: fix run failure when no commits
Browse files Browse the repository at this point in the history
  • Loading branch information
KFERMercer committed May 10, 2020
1 parent 3ba656a commit e92b4f6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion merge-upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,14 @@ jobs:

- name: Apply commit changes
run: |
if [ -f ./.git/MERGE_MSG ]; then
mkdir ./tmp && cp ./.git/MERGE_MSG ./tmp/message
sed -i "1c [bot] AutoMerging: merge all upstream's changes:" ./tmp/message
sed -i '/^\#.*/d' ./tmp/message
git commit --file="./tmp/message" || exit 0
git commit --file="./tmp/message"
else
echo "There is no merge commits."
fi
- name: Push Commits
env:
Expand Down

0 comments on commit e92b4f6

Please sign in to comment.