feat(notify-all): sha 字段截短到前 10 位(git short SHA)
lint / yamllint (push) Successful in 13s

This commit is contained in:
beforegolive
2026-07-16 09:00:38 +08:00
parent 1ec372142c
commit 224f5bdd78
2 changed files with 47 additions and 23 deletions
+13 -1
View File
@@ -37,7 +37,6 @@ secret 走 org-levelgitea_admin org 已配)。
| 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 keyorg secret |
| `bark_server` | `https://api.day.app` | Bark server(自建时改) |
@@ -49,6 +48,19 @@ secret 走 org-levelgitea_admin org 已配)。
| `smtp_pass` | `${{ secrets.EMAIL_SMTP_PASS }}` | SMTP 授权码(org secret |
| `to` | `${{ secrets.EMAIL_TO }}` | 收件邮箱(org secret |
> body 不再是 inputv1.1.2 起),由 notify-all 自动拼(status / branch / commit / **sha 前 10 位** / actor / run)。如需自定义 body,绕开 notify-all 直接用 notify-bark + notify-email。
## 自动拼的 body 格式
```
status: success
branch: main
commit: ci: any commit message
sha: 29a4454e0 # ← 只取前 10 位
actor: gitea_admin
run: http://gitea:3000/gitea_admin/<repo>/actions/runs/<id>
```
## 依赖的 org-level secretgitea_admin org 已配)
- `BARK_DEVICE_KEY`