This repository was archived by the owner on Apr 5, 2024. It is now read-only.
File tree 1 file changed +32
-0
lines changed
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 43
43
- name : Run tests
44
44
run : sh ci/run.sh ${{ matrix.os }}
45
45
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
+ permissions :
53
+ issues : write
54
+
55
+ steps :
56
+ - name : Create an issue
57
+ shell : bash
58
+ env :
59
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
60
+ run : |
61
+ readarray -t exists < <(gh issue list --state open --label nightly-CI-failed --json number --jq '.[].number' --repo "$GITHUB_REPOSITORY")
62
+ if [[ -n "${exists[@]}" ]]; then
63
+ echo "Not opening another issue, already have ${#exists[@]} issue(s), latest at ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/issues/${exists[0]}."
64
+ else
65
+ cat << EOF | gh issue create \
66
+ --label nightly-CI-failed \
67
+ --title "Nightly CI run failed" \
68
+ --repo "$GITHUB_REPOSITORY" \
69
+ --body-file -
70
+ The nightly CI run on $(date +%F) seems to have failed.
71
+
72
+ - Check the logs at ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${{ github.run_id }}
73
+ - Update to the latest 'rustc-nightly' if necessary
74
+ - Investigate test run failures if any
75
+ EOF
76
+ fi
77
+
46
78
# https://forge.rust-lang.org/infra/docs/bors.html#adding-a-new-repository-to-bors
47
79
build_result :
48
80
name : bors build finished
You can’t perform that action at this time.
0 commit comments