41
41
run : bash ci/setup-toolchain.sh
42
42
if : github.event_name == 'schedule'
43
43
- name : Run tests
44
- run : sh ci/run.sh ${{ matrix.os }}
44
+ run : sh -c "exit 1"
45
45
46
46
create_issue :
47
47
runs-on : ubuntu-latest
@@ -50,24 +50,31 @@ jobs:
50
50
# TEST: remove the nightly trigger condition
51
51
if : always() && needs.build_and_test.result == 'failure'
52
52
53
+ permissions :
54
+ issues : write
55
+
53
56
steps :
54
57
- name : Create an issue
55
58
shell : bash
59
+ env :
60
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
56
61
run : |
57
- readarray -t exists < <(gh issue list --state open --label nightly-CI-failed --json number --jq '.[].number')
58
- if [ -n "${exists[@]}" ]; then
59
- echo "Not opening another issue, already have ${#exists[@]} issue(s), latest at https://github.com/rust-lang/rust-semverver/issues/${exists[0]}."
62
+ set -x
63
+ readarray -t exists < <(gh issue list --state open --label nightly-CI-failed --json number --jq '.[].number' --repo "$GITHUB_REPOSITORY")
64
+ if [[ -n "${exists[@]}" ]]; then
65
+ echo "Not opening another issue, already have ${#exists[@]} issue(s), latest at ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/issues/${exists[0]}."
60
66
else
61
67
cat << EOF | gh issue create \
62
68
--label nightly-CI-failed \
63
69
--title "Nightly CI run failed" \
70
+ --repo "$GITHUB_REPOSITORY" \
64
71
--body-file -
65
72
The nightly CI run on $(date +%F) seems to have failed.
66
73
67
- - Check the logs at https://github.com/rust-lang/rust-semverver /actions/runs/${{ github.run_id }}
68
- - Update to the latest ` rustc-nightly` if necessary
74
+ - Check the logs at ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} /actions/runs/${{ github.run_id }}
75
+ - Update to the latest ' rustc-nightly' if necessary
69
76
- Investigate test run failures if any
70
- EOF
77
+ EOF
71
78
fi
72
79
73
80
# https://forge.rust-lang.org/infra/docs/bors.html#adding-a-new-repository-to-bors
0 commit comments