From 686ce44695fe237a6dc24781d54bc7363852496a Mon Sep 17 00:00:00 2001 From: Remco Vermeulen Date: Fri, 8 Sep 2023 15:28:42 -0700 Subject: [PATCH] Add support for external id and output inputs --- .github/workflows/update-check-run.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-check-run.yml b/.github/workflows/update-check-run.yml index 028748f9ad..da43d91f54 100644 --- a/.github/workflows/update-check-run.yml +++ b/.github/workflows/update-check-run.yml @@ -25,6 +25,17 @@ on: description: | The URL of the integrator's site that has the full details of the check. type: string + external_id: + description: | + A reference for the run on the integrator's system. + type: string + output: + description: | + The output object for the check run. + + See https://docs.github.com/en/rest/checks/runs?apiVersion=2022-11-28#update-a-check-run for more information. + type: string + default: '{}' permissions: checks: write @@ -39,13 +50,17 @@ jobs: CHECK_RUN_STATUS: ${{ inputs.status }} CHECK_RUN_CONCLUSION: ${{ inputs.conclusion }} CHECK_RUN_DETAILS_URL: ${{ inputs.details_url }} + CHECK_RUN_EXTERNAL_ID: ${{ inputs.external_id }} + CHECK_RUN_OUTPUT: ${{ inputs.output }} GITHUB_TOKEN: ${{ github.token }} run: | jq -n \ --arg status "$CHECK_RUN_STATUS" \ --arg conclusion "$CHECK_RUN_CONCLUSION" \ --arg details_url "$CHECK_RUN_DETAILS_URL" \ - '{status: $status, conclusion: $conclusion, details_url: $details_url} | to_entries | map(select(.value != "")) | from_entries' \ + --arg external_id "$CHECK_RUN_EXTERNAL_ID" \ + --argjson output "$CHECK_RUN_OUTPUT" \ + '{status: $status, conclusion: $conclusion, details_url: $details_url, external_id: $external_id, output: $output} | to_entries | map(select(.value != "" and .value != {})) | from_entries' \ | \ gh api \ --method PATCH \