From 99574b901e72283a272c47f28ccab046ddf9ad8f Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Fri, 1 Dec 2023 14:23:25 +0100 Subject: [PATCH] Obtain PR number right after checkout. --- .github/workflows/reporting.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/reporting.yml b/.github/workflows/reporting.yml index 87a0bce1..314255d9 100644 --- a/.github/workflows/reporting.yml +++ b/.github/workflows/reporting.yml @@ -16,6 +16,13 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Obtain PR number to write the comments to + id: pr + run: | + PR_NUMBER=$(gh pr view --json "number" --jq ".number") + echo "pr-number=${PR_NUMBER}" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Set up JDK 21 uses: actions/setup-java@v4 with: @@ -33,13 +40,6 @@ jobs: uses: codecov/codecov-action@v3.1.4 with: token: ${{secrets.CODECOV_TOKEN}} - - name: Obtain PR number to write the comments to - id: pr - run: | - PR_NUMBER=$(gh pr view --json "number" --jq ".number") - echo "pr-number=${PR_NUMBER}" >> $GITHUB_OUTPUT - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Run Autograding uses: uhafner/autograding-github-action@v3 with: