feat(notify-all): 加 channels input 选择通知通道 (v1.2.0)
lint / yamllint (push) Successful in 6m52s

新 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:
beforegolive
2026-07-16 13:48:01 +08:00
parent 323bf9bfdb
commit e9ed21bd4d
2 changed files with 19 additions and 0 deletions
+7
View File
@@ -12,6 +12,10 @@ inputs:
status:
description: 'Build job status (caller passes ${{ needs.<job>.result }})'
required: true
channels:
description: 'Notification channels: both (default) / bark / email'
required: false
default: 'both'
title:
description: 'Notification title'
required: false
@@ -74,7 +78,9 @@ runs:
echo "value=${SHORT}" >> "$GITHUB_OUTPUT"
# 2. Push to Bark(链式调 sibling action,完整 URL 因为 act_runner 0.2.11 不支持 ./relative
# 默认走 bark + email (channels=both),可传 channels=bark 只推 bark / channels=email 只发邮件
- name: Push to Bark
if: ${{ inputs.channels != 'email' }}
uses: http://gitea:3000/gitea_admin/ci-actions/notify-bark@v1.1.2
with:
device_key: ${{ inputs.bark_device_key }}
@@ -92,6 +98,7 @@ runs:
# 3. Send email
- name: Send email
if: ${{ inputs.channels != 'bark' }}
uses: http://gitea:3000/gitea_admin/ci-actions/notify-email@v1.1.2
with:
smtp_host: ${{ inputs.smtp_host }}