Merge bitcoin/bitcoin#33754: ci: gha: Set debug_pull_request_number_str annotation

fa9d0f994b ci: gha: Set debug_pull_request_number_str annotation (MarcoFalke)

Pull request description:

  GitHub Actions does not offer any way to determine the pull request number in a machine readable way from the checks API. See https://github.com/bitcoin/bitcoin/issues/27178#issuecomment-1503475232.

  However, the pull request number can be useful for external tools to act on CI results.

  Fix that by using a check run annotation for a single task named `debug_pull_request_number_str`.

  This should re-enable the 'CI Failed' labelling mechanism via https://github.com/maflcko/DrahtBot/commit/1f24cc1ab9be8ad35fbb3a44aaa073bf669a7685.

ACKs for top commit:
  l0rinc:
    code review ACK fa9d0f994b
  willcl-ark:
    ACK fa9d0f994b

Tree-SHA512: d872b81afeaef603006bb65f18acafdff2771acf2b70af4ab6b46167b0826e96b1ac434bba2020833107922eaf1e73f59a50782a535ba04ea16921f1828d42ca
This commit is contained in:
merge-script committed 2025-11-03 14:18:38 +00:00
commit 746d36cc80
1 file changed
+8
+8
View File
@@ -35,6 +35,14 @@ jobs:
outputs:
provider: ${{ steps.runners.outputs.provider }}
steps:
- name: Annotate with pull request number
# This annotation is machine-readable and can be used to assign a check
# run to its corresponding pull request. Running in one check run is
# sufficient for each check suite.
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
echo "::notice title=debug_pull_request_number_str::${{ github.event.number }}"
fi
- id: runners
run: |
if [[ "${REPO_USE_CIRRUS_RUNNERS}" == "${{ github.repository }}" ]]; then