ci: Annotate all check runs with the pull request number
What changed, and why it matters
This commit is a routine improvement to Bitcoin Core's GitHub Actions CI workflow. It makes sure every CI job prints a machine-readable annotation containing the pull request number, because GitHub discards those annotations when individual checks are re-run. There is no security-relevant change here.
No security action needed. This is a normal CI maintenance change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change refactors a single CI step into a YAML anchor (&ANNOTATION_PR_NUMBER) and reuses it in every job in .github/workflows/ci.yml. The annotation is a debug notice used to map check runs back to pull requests. It does not alter build logic, secrets handling, permissions, checkout behavior, or any shipped code.
Changed components
.github/workflows/ci.ymlInspect captured patch +18 / −3
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 5a316c68..4f802fad 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -35,10 +35,12 @@ jobs:
outputs:
provider: ${{ steps.runners.outputs.provider }}
steps:
- - name: Annotate with pull request number
+ - &ANNOTATION_PR_NUMBER
+ 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 to its corresponding pull request. Running in all check runs is
+ # required, because check re-runs discard the annotations of other
+ # tasks in the test suite.
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
echo "::notice title=debug_pull_request_number_str::${{ github.event.number }}"
@@ -63,6 +65,7 @@ jobs:
steps:
- name: Determine fetch depth
run: echo "FETCH_DEPTH=$((${{ github.event.pull_request.commits }} + 2))" >> "$GITHUB_ENV"
+ - *ANNOTATION_PR_NUMBER
- uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha }}
@@ -141,6 +144,8 @@ jobs:
BASE_ROOT_DIR: ${{ github.workspace }}
steps:
+ - *ANNOTATION_PR_NUMBER
+
- &CHECKOUT
name: Checkout
uses: actions/checkout@v5
@@ -212,6 +217,8 @@ jobs:
job-name: 'Windows native, fuzz, VS 2022'
steps:
+ - *ANNOTATION_PR_NUMBER
+
- *CHECKOUT
- &SET_UP_VS
@@ -341,6 +348,8 @@ jobs:
DANGER_CI_ON_HOST_FOLDERS: 1
steps:
+ - *ANNOTATION_PR_NUMBER
+
- *CHECKOUT
- name: Configure environment
@@ -381,6 +390,8 @@ jobs:
TEST_RUNNER_TIMEOUT_FACTOR: 40
steps:
+ - *ANNOTATION_PR_NUMBER
+
- *CHECKOUT
- name: Download built executables
@@ -547,6 +558,8 @@ jobs:
file-env: './ci/test/00_setup_env_native_msan.sh'
steps:
+ - *ANNOTATION_PR_NUMBER
+
- *CHECKOUT
- name: Configure environment
@@ -587,6 +600,8 @@ jobs:
env:
CONTAINER_NAME: "bitcoin-linter"
steps:
+ - *ANNOTATION_PR_NUMBER
+
- name: Checkout
uses: actions/checkout@v5
with:
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.