Skip to content

Commit

Permalink
Merge pull request #589 from redis/DOC-3993
Browse files Browse the repository at this point in the history
Allow non-zero exit codes for certain commands in redis_docs_sync workflow
  • Loading branch information
paoloredis authored Aug 22, 2024
2 parents 3ab10ea + e34d697 commit 18725fc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/redis_docs_sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,16 @@ jobs:
# check if remote branch already exists
git fetch --all
set +e
git ls-remote --exit-code --heads origin "refs/heads/${BRANCH}"
if [ "$?" -eq 0 ]; then
set -e
# if it does, create local branch off existing remote branch
git checkout -b "${BRANCH}" "origin/${BRANCH}"
git branch --set-upstream-to="origin/${BRANCH}" "${BRANCH}"
git pull
else
set -e
# otherwise, create local branch from main
git checkout -b "${BRANCH}"
fi
Expand Down Expand Up @@ -89,8 +92,10 @@ jobs:
fi
# If a pr is not already open, create one
set +e
gh search prs -R redis/docs --state open --match title "redis docs ${RELEASE}" | grep -q "redis docs ${RELEASE}"
if [ "$?" -eq 1 ]; then
set -e
gh pr create \
--body "redis docs sync ${RELEASE}" \
--title "redis docs sync ${RELEASE}" \
Expand Down

0 comments on commit 18725fc

Please sign in to comment.