feat(notify-bark): composite action 推送 Gitea Actions 结果到 Bark

This commit is contained in:
gitea_admin
2026-07-13 09:29:01 +08:00
parent 03f7f1e631
commit 2e99202570
2 changed files with 78 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
# notify-bark
推送 Gitea Actions run 结果到 [Bark](https://github.com/Finb/Bark) iOS 客户端。
## Inputs
| 名称 | 必填 | 默认 | 说明 |
|---|---|---|---|
| `device_key` | 是 | — | Bark 设备 key |
| `server` | 否 | `https://api.day.app` | Bark server URL |
| `title` | 是 | — | 推送标题 |
| `body` | 是 | — | 推送正文(支持多行) |
| `group` | 否 | `gitea-ci` | 通知分组 |
| `level` | 否 | `active` | `active` / `timeSensitive` / `passive` / `default` |
## 使用示例
```yaml
- uses: gitea_admin/ci-actions/notify-bark@v1
with:
device_key: ${{ secrets.BARK_DEVICE_KEY }}
title: "[${{ github.repository }}] ${{ github.workflow }}"
body: |
status: ${{ needs.build.result }}
run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
```
## 失败处理
推送失败时输出 `::warning::Bark push failed (non-fatal)`**不阻塞**调用方 job。