- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| tests | ||
| .gitignore | ||
| action.yml | ||
| alert.py | ||
| COPYING | ||
| COPYING.LESSER | ||
| README.md | ||
splent_ci_alert
A step for Forgejo Actions (and GitHub Actions) that turns a failed workflow into an issue. A failing run on a watched branch opens an issue, later failing runs comment on it, and the first passing run closes it. Whoever watches the repository gets the notification, by email too when the forge sends mail.
Usage
Add a last job that needs every other job and always runs.
jobs:
lint:
...
test:
...
alert:
needs: [lint, test]
if: always() && github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: https://git.splent.io/splent-io/splent_ci_alert@v1
with:
needs: ${{ toJSON(needs) }}
The automatic token is enough. The runner image needs python3.
Inputs
| Input | Default | Meaning |
|---|---|---|
needs |
The job's needs context as ${{ toJSON(needs) }} |
|
token |
${{ github.token }} |
Token that can read and write issues |
branches |
main |
Space-separated branches that raise alerts |
What counts
Any failed job makes the run failing. A run where every job passed or was skipped is passing. Cancelled runs, pull requests, tags and other branches change nothing.
There is one issue per workflow and branch, found by a hidden marker in its body, so renaming the issue is fine.
License
LGPL-3.0-or-later. See COPYING.LESSER and COPYING.