summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2020-07-20 17:11:30 +0200
committerPietro Albini <pietro@pietroalbini.org>2020-07-20 17:12:30 +0200
commit5e11ae4fc52e749f43d334e96ba06c979fa67ef7 (patch)
treee71fda9f3e1aca57a5fc7ac60223706d8e644546
parent71384101ea3b030b80f7def80a37f67e148518b0 (diff)
downloadrust-5e11ae4fc52e749f43d334e96ba06c979fa67ef7.tar.gz
ci: allow RLA to pick the right PR number
-rw-r--r--.github/workflows/ci.yml20
-rw-r--r--src/ci/github-actions/ci.yml9
2 files changed, 29 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 86de3782000..e3525efd4b6 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -63,6 +63,11 @@ jobs:
with:
github_token: "${{ secrets.github_token }}"
if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
+ - name: configure the PR in which the error message will be posted
+ run: "echo \"[CI_PR_NUMBER=$num]\""
+ env:
+ num: "${{ github.event.number }}"
+ if: "success() && !env.SKIP_JOBS && github.event_name == 'pull_request'"
- name: add extra environment variables
run: src/ci/scripts/setup-environment.sh
env:
@@ -162,6 +167,11 @@ jobs:
with:
github_token: "${{ secrets.github_token }}"
if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
+ - name: configure the PR in which the error message will be posted
+ run: "echo \"[CI_PR_NUMBER=$num]\""
+ env:
+ num: "${{ github.event.number }}"
+ if: "success() && !env.SKIP_JOBS && github.event_name == 'pull_request'"
- name: add extra environment variables
run: src/ci/scripts/setup-environment.sh
env:
@@ -479,6 +489,11 @@ jobs:
with:
github_token: "${{ secrets.github_token }}"
if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
+ - name: configure the PR in which the error message will be posted
+ run: "echo \"[CI_PR_NUMBER=$num]\""
+ env:
+ num: "${{ github.event.number }}"
+ if: "success() && !env.SKIP_JOBS && github.event_name == 'pull_request'"
- name: add extra environment variables
run: src/ci/scripts/setup-environment.sh
env:
@@ -604,6 +619,11 @@ jobs:
with:
github_token: "${{ secrets.github_token }}"
if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
+ - name: configure the PR in which the error message will be posted
+ run: "echo \"[CI_PR_NUMBER=$num]\""
+ env:
+ num: "${{ github.event.number }}"
+ if: "success() && !env.SKIP_JOBS && github.event_name == 'pull_request'"
- name: add extra environment variables
run: src/ci/scripts/setup-environment.sh
env:
diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml
index 5573d87aa2e..d2b804f08c3 100644
--- a/src/ci/github-actions/ci.yml
+++ b/src/ci/github-actions/ci.yml
@@ -92,6 +92,15 @@ x--expand-yaml-anchors--remove:
if: success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'
<<: *step
+ # Rust Log Analyzer can't currently detect the PR number of a GitHub
+ # Actions build on its own, so a hint in the log message is needed to
+ # point it in the right direction.
+ - name: configure the PR in which the error message will be posted
+ run: echo "[CI_PR_NUMBER=$num]"
+ env:
+ num: ${{ github.event.number }}
+ if: success() && !env.SKIP_JOBS && github.event_name == 'pull_request'
+
- name: add extra environment variables
run: src/ci/scripts/setup-environment.sh
env: