Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an issue when nightly-ci fails #3080

Merged
merged 3 commits into from
Feb 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/ci_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,21 @@ jobs:
device: ${{ matrix.device.soc }}
target: ${{ matrix.device.target }}
toolchain: nightly

- name: Create or Update GitHub Issue
if: failure()
run: |
sudo apt-get install gh -y
ISSUE_NAME=$(gh issue list --state open --search "Nightly CI Failure in:title" --json number --jq '.[0].number')

if [[ -n "$ISSUE_NAME" ]]; then
gh issue comment "$ISSUE_NAME" \
--body "Another CI failure detected! [View the failed job](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})."
else
gh issue create \
--title "Nightly CI Failure" \
--body "Nightly CI Workflow Failed! [View the failed job](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})." \
--label "ci-nightly"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}