notify-all
Bark iOS push + SMTP email in one step. Designed for zero-config when paired with org-level (or instance-level) secrets on Gitea.
Usage (极简 / recommended)
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: echo "your build steps"
notify:
needs: build
if: always()
runs-on: ubuntu-latest
steps:
- name: notify
uses: http://gitea:3000/gitea_admin/ci-actions/notify-all@v1
with:
status: ${{ needs.build.result }}
That's it — Bark 推送 + 邮件发送全自动,body/title/subject 自动从 github.* + inputs.status 拼,
secret 走 org-level(gitea_admin org 已配)。
必传
| Input | 来源 | 说明 |
|---|---|---|
status |
caller → ${{ needs.build.result }} |
唯一必传,用于拼 body / subject |
可选 inputs(全部有默认值)
| Input | Default | 说明 |
|---|---|---|
title |
[${{ github.repository }}] ${{ github.workflow }} |
Bark 推送标题 |
body |
自动拼 status / branch / commit / sha / actor / run | 通知正文(Bark + Email 共用) |
email_subject |
[gitea-ci] ${{ github.repository }} - ${{ inputs.status }} |
邮件主题 |
bark_device_key |
${{ secrets.BARK_DEVICE_KEY }} |
Bark key(org secret) |
bark_server |
https://api.day.app |
Bark server(自建时改) |
bark_group |
gitea-ci |
Bark 分组 |
bark_level |
active |
active / timeSensitive / passive / default |
smtp_host |
smtp.163.com |
SMTP host |
smtp_port |
465 |
SMTP SSL 端口 |
smtp_user |
${{ secrets.EMAIL_USER }} |
发件邮箱(org secret) |
smtp_pass |
${{ secrets.EMAIL_SMTP_PASS }} |
SMTP 授权码(org secret) |
to |
${{ secrets.EMAIL_TO }} |
收件邮箱(org secret) |
依赖的 org-level secret(gitea_admin org 已配)
BARK_DEVICE_KEYEMAIL_USEREMAIL_SMTP_PASSEMAIL_TO
业务 repo 不需要再配 secret。
内部实现
notify-all 是 composite action,内部 chain 调 sibling action:
uses: ./notify-barkuses: ./notify-email
v1.1.0 tag 下三个 action 自包含,runner 拉一次仓库就够。
失败处理
Bark / Email 任一失败 → ::warning:: 输出 → step 仍 Success → job 不阻塞。
(继承自 notify-bark / notify-email 的 curl --retry 2 + if ! 包裹逻辑。)