Skip to content

Commit e34d697

Browse files
committed
Allow non-zero exit codes for certain commands
1 parent c4d39cb commit e34d697

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/redis_docs_sync.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,16 @@ jobs:
4747
4848
# check if remote branch already exists
4949
git fetch --all
50+
set +e
5051
git ls-remote --exit-code --heads origin "refs/heads/${BRANCH}"
5152
if [ "$?" -eq 0 ]; then
53+
set -e
5254
# if it does, create local branch off existing remote branch
5355
git checkout -b "${BRANCH}" "origin/${BRANCH}"
5456
git branch --set-upstream-to="origin/${BRANCH}" "${BRANCH}"
5557
git pull
5658
else
59+
set -e
5760
# otherwise, create local branch from main
5861
git checkout -b "${BRANCH}"
5962
fi
@@ -89,8 +92,10 @@ jobs:
8992
fi
9093
9194
# If a pr is not already open, create one
95+
set +e
9296
gh search prs -R redis/docs --state open --match title "redis docs ${RELEASE}" | grep -q "redis docs ${RELEASE}"
9397
if [ "$?" -eq 1 ]; then
98+
set -e
9499
gh pr create \
95100
--body "redis docs sync ${RELEASE}" \
96101
--title "redis docs sync ${RELEASE}" \

0 commit comments

Comments
 (0)