Skip to content

Commit d89fbd1

Browse files
committed
Fix syntax of workflow cmd
1 parent 9f54343 commit d89fbd1

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
run: bash ci/setup-toolchain.sh
4242
if: github.event_name == 'schedule'
4343
- name: Run tests
44-
run: sh ci/run.sh ${{ matrix.os }}
44+
run: sh -c "exit 1"
4545

4646
create_issue:
4747
runs-on: ubuntu-latest
@@ -52,22 +52,28 @@ jobs:
5252

5353
steps:
5454
- name: Create an issue
55+
permissions:
56+
issues: write
5557
shell: bash
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5660
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]}."
61+
set -x
62+
readarray -t exists < <(gh issue list --state open --label nightly-CI-failed --json number --jq '.[].number' --repo "$GITHUB_REPOSITORY")
63+
if [[ -n "${exists[@]}" ]]; then
64+
echo "Not opening another issue, already have ${#exists[@]} issue(s), latest at ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/issues/${exists[0]}."
6065
else
6166
cat << EOF | gh issue create \
6267
--label nightly-CI-failed \
6368
--title "Nightly CI run failed" \
69+
--repo "$GITHUB_REPOSITORY" \
6470
--body-file -
6571
The nightly CI run on $(date +%F) seems to have failed.
6672
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
73+
- Check the logs at ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${{ github.run_id }}
74+
- Update to the latest 'rustc-nightly' if necessary
6975
- Investigate test run failures if any
70-
EOF
76+
EOF
7177
fi
7278
7379
# https://forge.rust-lang.org/infra/docs/bors.html#adding-a-new-repository-to-bors

0 commit comments

Comments
 (0)