-
Notifications
You must be signed in to change notification settings - Fork 245
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
base: main
Are you sure you want to change the base?
Conversation
@@ -51,3 +51,19 @@ jobs: | |||
device: ${{ matrix.device.soc }} | |||
target: ${{ matrix.device.target }} | |||
toolchain: nightly | |||
|
|||
create-issue-on-failure: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't need to be a completely new job I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to play with it but couldn't figure out how to do that without a separate job so I went with easier option :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, you could set continue-on-error
and then transform your issue job into a steps that checks if: failure()
something like that should do the trick I think
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
filename: .github/ISSUE_TEMPLATE/nightly_ci.md | ||
update_existing: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried this? From their docs:
The update_existing param can be passed and set to true when you want to update an open issue with the exact same title when it exists and false if you don't want to create a new issue, but skip updating an existing one.
What is exactly updated? It would be very cool if we had the error message in the issue body, and this update feature added the new errors either in the description or in a new comment, but this doesn't look simple enough to be worth the time.
create-issue-on-failure: | ||
name: Create Issue on Failure | ||
runs-on: ubuntu-latest | ||
needs: esp-hal-nightly | ||
if: failure() | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 # Ensures the repo is cloned before accessing the issue template | ||
|
||
- name: Create GitHub Issue | ||
uses: JasonEtco/create-an-issue@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
filename: .github/ISSUE_TEMPLATE/nightly_ci.md | ||
update_existing: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create-issue-on-failure: | |
name: Create Issue on Failure | |
runs-on: ubuntu-latest | |
needs: esp-hal-nightly | |
if: failure() | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 # Ensures the repo is cloned before accessing the issue template | |
- name: Create GitHub Issue | |
uses: JasonEtco/create-an-issue@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
filename: .github/ISSUE_TEMPLATE/nightly_ci.md | |
update_existing: true | |
- if: failure() | |
name: Create GitHub Issue | |
uses: JasonEtco/create-an-issue@v2 | |
with: | |
filename: .github/ISSUE_TEMPLATE/nightly_ci.md | |
update_existing: true |
I think this should work?
closes #3068
I've tested this with another repo, works fine there, hopefully I haven't missed anything. I'm volunteering to work on those nightly issues (I will assign them to myself), I also created a new label
ci-nightly
that should be assigned to the issue, also already existing issue should be updated automatically so we don't have duplicates - this is at least the theory behind this PR 😆