Skip to content

Commit 4f5abfd

Browse files
committed
test
1 parent 5be2f02 commit 4f5abfd

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,19 +45,23 @@ jobs:
4545
outputs:
4646
PR_OPEN: ${{ steps.check_pr.outputs.pr_open }}
4747
steps:
48+
- name: Checkout
49+
uses: actions/checkout@v2
50+
with:
51+
ref: ${{ github.ref }}
52+
4853
- name: Check if PR is open
4954
id: check_pr
5055
run: |
5156
set -euo pipefail
5257
pr_open=true
53-
if [[ "$(gh pr view $PR_BRANCH --json state | jq -r '.state')" != "true" ]]; then
58+
if [[ "$(gh pr view --json state | jq -r '.state')" != "OPEN" ]]; then
5459
echo "PR doesn't exist or is closed."
5560
pr_open=false
5661
fi
5762
echo "pr_open=$pr_open" >> $GITHUB_OUTPUT
5863
env:
5964
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60-
PR_BRANCH: ${{ github.ref }}
6165

6266
get_info:
6367
needs: check_pr
@@ -87,7 +91,7 @@ jobs:
8791
echo "PR_BRANCH=$PR_BRANCH" >> $GITHUB_OUTPUT
8892
env:
8993
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
90-
PR_BRANCH: ${{ github.ref }}
94+
PR_BRANCH: ${${{ github.ref}}#refs/heads/}
9195

9296
- name: Set required tags
9397
id: set_tags

0 commit comments

Comments
 (0)