From 9caf13357ba0a71e71e54ca96668581c14f029e1 Mon Sep 17 00:00:00 2001 From: Jakub Zerko Date: Fri, 18 Oct 2024 12:58:59 +0200 Subject: [PATCH] fix: pr number --- .github/workflows/generate-screenshots.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate-screenshots.yml b/.github/workflows/generate-screenshots.yml index 4e5557925ec..9f25a6482d2 100644 --- a/.github/workflows/generate-screenshots.yml +++ b/.github/workflows/generate-screenshots.yml @@ -93,10 +93,12 @@ jobs: PR_BRANCH: ${{ env.BRANCH_NAME }} run: | gh pr create --title "$PR_TITLE" --body "$PR_BODY" --base screenshot-tests --head "$PR_BRANCH" --label "screenshot-test" + PR_NUMBER=$(gh pr view --json number -q .number) + echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV - name: Add comment with test report link run: | - gh issue comment ${{ github.event.pull_request.number }} --body "Screenshot test results have been generated. [Download the report](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts)" + gh issue comment "${{ env.PR_NUMBER }}" --body "Screenshot test results have been generated. [Download the report](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts)" - name: Cleanup Gradle Cache run: |