Skip to content

Commit 76dbe1b

Browse files
committed
fix
1 parent 832e237 commit 76dbe1b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/pr-deploy.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,17 @@ jobs:
4545
outputs:
4646
PR_OPEN: ${{ steps.check_pr.outputs.pr_open }}
4747
steps:
48+
- name: Checkout
49+
uses: actions/checkout@v2
50+
4851
- name: Check if PR is open
4952
id: check_pr
5053
run: |
5154
set -euo pipefail
52-
if [[ $(gh pr view --json state | jq -r '.state') != "OPEN" ]]; then
53-
echo "a PR is not open. skipping"
54-
pr_open=$(gh pr view --json state | jq -r '.state' != "OPEN")
55+
pr_open=$(gh pr view --json state | jq -r '.state' != "OPEN")
56+
if [[ "$pr_open" == "true" ]]; then
57+
echo "PR is closed. Exiting."
58+
exit 0
5559
fi
5660
echo "pr_open=$pr_open" >> $GITHUB_OUTPUT
5761
env:

0 commit comments

Comments
 (0)