GitHub Action to notify the failure of GitHub Actions Workflow to a GitHub Issue.
It posts a comment and re-open the issue if the workflow fails.
And it closes the issue if the workflow succeeds.
If you run a workflow periodically by schedule event, you need to notice when the workflow has something wrong. This action posts a comment to an issue, then you can receive the notification quickly via email or somehow.
- uses: suzuki-shunsuke/notify-workflow-error-action@e5e8817e62eb122231d162dbc8309c4d05a21b2e # v0.1.0
if: always()
with:
issue_number: "225"
status: ${{ job.status }}
This action uses ${{ github.token }}
to update the issue. So the permission issues:write
is required.
permissions:
issues: write
issue_number
: GitHub Issue Number. You need to create an issue in advancestatus
: The status of the current job or workflow- If the value is
success
, the action closes the issue - If the value is
failure
, the action re-open the issue - Otherwise, the action does nothing. So if the value is
cancelled
orskipped
, the action does nothing
- If the value is
Nothing.
Nothing.