File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 4343 - name : Run tests
4444 run : sh ci/run.sh ${{ matrix.os }}
4545
46+ create_issue :
47+ runs-on : ubuntu-latest
48+ # the combination of these two lines seems to do the "if build_and_test failed, run this one"
49+ needs : build_and_test
50+ if : always() && github.event_name == 'schedule' && needs.build_and_test.result == 'failure'
51+
52+ steps :
53+ - name : Create an issue
54+ shell : bash
55+ run : |
56+ readarray -t exists < <(gh issue list --state open --label nightly-CI-failed --json number --jq '.[].number')
57+ if [ -n "${exists[@]}" ]; then
58+ echo "Not opening another issue, already have ${#exists[@]} issue(s), latest at https://github.com/rust-lang/rust-semverver/issues/${exists[0]}."
59+ else
60+ cat << EOF | gh issue create \
61+ --label nightly-CI-failed \
62+ --title "Nightly CI run failed" \
63+ --body-file -
64+ The nightly CI run on $(date +%F) seems to have failed.
65+
66+ - Check the logs at https://github.com/rust-lang/rust-semverver/actions/runs/${{ github.run_id }}
67+ - Update to the latest `rustc-nightly` if necessary
68+ - Investigate test run failures if any
69+ EOF
70+ fi
71+
4672 # https://forge.rust-lang.org/infra/docs/bors.html#adding-a-new-repository-to-bors
4773 build_result :
4874 name : bors build finished
You can’t perform that action at this time.
0 commit comments