Skip to content

Commit d3aaac0

Browse files
pietroalbiniMark-Simulacrum
authored andcommitted
ci: allow RLA to pick the right PR number
1 parent 346dc2f commit d3aaac0

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ jobs:
6363
with:
6464
github_token: "${{ secrets.github_token }}"
6565
if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
66+
- name: configure the PR in which the error message will be posted
67+
run: "echo \"[CI_PR_NUMBER=$num]\""
68+
env:
69+
num: "${{ github.event.number }}"
70+
if: "success() && !env.SKIP_JOBS && github.event_name == 'pull_request'"
6671
- name: add extra environment variables
6772
run: src/ci/scripts/setup-environment.sh
6873
env:
@@ -162,6 +167,11 @@ jobs:
162167
with:
163168
github_token: "${{ secrets.github_token }}"
164169
if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
170+
- name: configure the PR in which the error message will be posted
171+
run: "echo \"[CI_PR_NUMBER=$num]\""
172+
env:
173+
num: "${{ github.event.number }}"
174+
if: "success() && !env.SKIP_JOBS && github.event_name == 'pull_request'"
165175
- name: add extra environment variables
166176
run: src/ci/scripts/setup-environment.sh
167177
env:
@@ -473,6 +483,11 @@ jobs:
473483
with:
474484
github_token: "${{ secrets.github_token }}"
475485
if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
486+
- name: configure the PR in which the error message will be posted
487+
run: "echo \"[CI_PR_NUMBER=$num]\""
488+
env:
489+
num: "${{ github.event.number }}"
490+
if: "success() && !env.SKIP_JOBS && github.event_name == 'pull_request'"
476491
- name: add extra environment variables
477492
run: src/ci/scripts/setup-environment.sh
478493
env:
@@ -598,6 +613,11 @@ jobs:
598613
with:
599614
github_token: "${{ secrets.github_token }}"
600615
if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
616+
- name: configure the PR in which the error message will be posted
617+
run: "echo \"[CI_PR_NUMBER=$num]\""
618+
env:
619+
num: "${{ github.event.number }}"
620+
if: "success() && !env.SKIP_JOBS && github.event_name == 'pull_request'"
601621
- name: add extra environment variables
602622
run: src/ci/scripts/setup-environment.sh
603623
env:

src/ci/github-actions/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,15 @@ x--expand-yaml-anchors--remove:
9292
if: success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'
9393
<<: *step
9494

95+
# Rust Log Analyzer can't currently detect the PR number of a GitHub
96+
# Actions build on its own, so a hint in the log message is needed to
97+
# point it in the right direction.
98+
- name: configure the PR in which the error message will be posted
99+
run: echo "[CI_PR_NUMBER=$num]"
100+
env:
101+
num: ${{ github.event.number }}
102+
if: success() && !env.SKIP_JOBS && github.event_name == 'pull_request'
103+
95104
- name: add extra environment variables
96105
run: src/ci/scripts/setup-environment.sh
97106
env:

0 commit comments

Comments
 (0)