From 0bc4a756c499f438a11d4e4dcd2a4824491dc44a Mon Sep 17 00:00:00 2001 From: Mark Chan <45706356+WindowsMEMZ@users.noreply.github.com> Date: Wed, 29 Nov 2023 00:27:20 +0800 Subject: [PATCH] Update statuscheck-runner.yml --- .github/workflows/statuscheck-runner.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/statuscheck-runner.yml b/.github/workflows/statuscheck-runner.yml index e73b1ac4e..372e526dd 100644 --- a/.github/workflows/statuscheck-runner.yml +++ b/.github/workflows/statuscheck-runner.yml @@ -22,10 +22,25 @@ jobs: echo "The comment content contains the specified text. Continuing with further actions." echo "::set-output name=shouldc::true" fi - call-check-workflow: - name: Run + get-head-sha: + name: Get Pull Request Head SHA needs: checkif if: ${{ needs.checkif.outputs.shouldc == 'true' }} + runs-on: ubuntu-latest + outputs: + psha: ${{ steps.getsha.outputs.psha }} + env: + slink: ${{ github.event.issue.pull_request.url }} + steps: + - name: Get SHA + id: getsha + run: | + json_data=$(curl -s "$slink") + sha=$(echo "$json_data" | jq -r '.head.sha') + echo "psha=$sha" >> $GITHUB_OUTPUT + call-check-workflow: + name: Run + needs: get-head-sha uses: Darock-Studio/Darock-Bili/.github/workflows/status-check.yml@main with: - psha: ${{ github.event.issue.pull_request.url }} + psha: ${{ needs.get-head-sha.outputs.psha }}