Skip to content

Commit

Permalink
do not fail on gh pr view failure
Browse files Browse the repository at this point in the history
  • Loading branch information
jprochazk committed Oct 12, 2023
1 parent d474d82 commit 35b561a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,13 @@ jobs:
env:
GH_TOKEN: ${{ secrets.RERUN_BOT_TOKEN }}
run: |
pr=$(gh pr view --json headRefName 2>/dev/null)
set +e
pr=$(gh pr view --json headRefName 2>/dev/null || echo "no pull requests found")
if echo "$pr" | jq '. | has("headRefName")' | grep -q 'true'; then
echo "PR already exists"
exit 0
fi
set -e
echo "PR does not exist, creating…"
Expand Down

0 comments on commit 35b561a

Please sign in to comment.