Skip to content

Commit 815c6f4

Browse files
committed
Use env vars instead of contexts
1 parent ee81bf2 commit 815c6f4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/qhelp-pr-preview.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ jobs:
3333
qhelp:
3434
runs-on: ubuntu-latest
3535
steps:
36-
- run: echo "${{ github.event.number }}" > pr_number.txt
36+
- run: echo "${PR_NUMBER}" > pr_number.txt
37+
env:
38+
PR_NUMBER: ${{ github.event.number }}
3739
- uses: actions/upload-artifact@v2
3840
with:
3941
name: comment
@@ -85,9 +87,10 @@ jobs:
8587
run: |
8688
# Find the latest comment starting with "QHelp previews"
8789
COMMENT_PREFIX="QHelp previews"
88-
gh api "repos/${{ github.repository }}/issues/${{ github.event.number }}/comments" --paginate --jq "[.[] | select(.body|startswith(\"${COMMENT_PREFIX}\")) | .id] | max" > comment_id.txt
90+
gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/comments" --paginate --jq "[.[] | select(.body|startswith(\"${COMMENT_PREFIX}\")) | .id] | max" > comment_id.txt
8991
env:
9092
GITHUB_TOKEN: ${{ github.token }}
93+
PR_NUMBER: ${{ github.event.number }}
9194

9295
- uses: actions/upload-artifact@v2
9396
with:

0 commit comments

Comments
 (0)