新 input:
channels: 默认 'both'(同时推 Bark + 发邮件)
可选 'bark'(只推 Bark)/ 'email'(只发邮件)
实现:composite step 加 'if' 条件
Push to Bark: if ${{ inputs.channels != 'email' }}
Send email: if ${{ inputs.channels != 'bark' }}
兼容:未传 channels 时默认 both,向后兼容 v1.1.x 用法。
README.md / docker-gitea/docs/ci-actions.md 同步更新。
This commit is contained in:
@@ -36,6 +36,7 @@ secret 走 org-level(gitea_admin org 已配)。
|
||||
|
||||
| Input | Default | 说明 |
|
||||
|---|---|---|
|
||||
| `channels` | `both` | 通知通道:`both` / `bark` / `email` |
|
||||
| `title` | `[${{ github.repository }}] ${{ github.workflow }}` | Bark 推送标题 |
|
||||
| `email_subject` | `[gitea-ci] ${{ github.repository }} - ${{ inputs.status }}` | 邮件主题 |
|
||||
| `bark_device_key` | `${{ secrets.BARK_DEVICE_KEY }}` | Bark key(org secret) |
|
||||
@@ -70,6 +71,17 @@ run: http://gitea:3000/gitea_admin/<repo>/actions/runs/<id>
|
||||
|
||||
业务 repo 不需要再配 secret。
|
||||
|
||||
## 选通道
|
||||
|
||||
```yaml
|
||||
- uses: http://gitea:3000/gitea_admin/ci-actions/notify-all@v1.2.0
|
||||
with:
|
||||
status: ${{ needs.build.result }}
|
||||
channels: email # 只发邮件(不推 Bark)
|
||||
```
|
||||
|
||||
可选值:`both`(默认)/ `bark` / `email`。
|
||||
|
||||
## 内部实现
|
||||
|
||||
`notify-all` 是 composite action,内部 chain 调 sibling action:
|
||||
|
||||
Reference in New Issue
Block a user