Compare commits
1 Commits
7e7869078b
...
ed7d63a5d5
| Author | SHA1 | Date | |
|---|---|---|---|
|
ed7d63a5d5
|
@@ -47,7 +47,11 @@ jobs:
|
|||||||
git config user.email "gitea-bot@alexlebens.net"
|
git config user.email "gitea-bot@alexlebens.net"
|
||||||
|
|
||||||
echo ">> Checking if PR branch exists ..."
|
echo ">> Checking if PR branch exists ..."
|
||||||
if [[ $(git ls-remote --heads origin "${BRANCH_NAME}" | wc -l) -gt 0 ]]; then
|
set e+
|
||||||
|
git ls-remote --exit-code --heads origin "${BRANCH_NAME}" > /dev/null 2>&1
|
||||||
|
set e-
|
||||||
|
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
echo ">> Branch '${BRANCH_NAME}' exists, pulling changes ..."
|
echo ">> Branch '${BRANCH_NAME}' exists, pulling changes ..."
|
||||||
git fetch origin "${BRANCH_NAME}"
|
git fetch origin "${BRANCH_NAME}"
|
||||||
git checkout "${BRANCH_NAME}"
|
git checkout "${BRANCH_NAME}"
|
||||||
|
|||||||
Reference in New Issue
Block a user