Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
f133b051
Commit
f133b051
authored
Dec 27, 2025
by
shaw
Browse files
fix: 修复TG通知workflow语法错误
- 移除if条件中对secrets的直接引用(GitHub Actions不支持) - 改用shell脚本内部检查环境变量是否存在
parent
7af1bdbf
Changes
1
Show whitespace changes
Inline
Side-by-side
.github/workflows/release.yml
View file @
f133b051
...
@@ -146,12 +146,17 @@ jobs:
...
@@ -146,12 +146,17 @@ jobs:
# Send Telegram notification
# Send Telegram notification
-
name
:
Send Telegram Notification
-
name
:
Send Telegram Notification
if
:
${{ secrets.TELEGRAM_BOT_TOKEN != '' && secrets.TELEGRAM_CHAT_ID != '' }}
env
:
env
:
TELEGRAM_BOT_TOKEN
:
${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_BOT_TOKEN
:
${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID
:
${{ secrets.TELEGRAM_CHAT_ID }}
TELEGRAM_CHAT_ID
:
${{ secrets.TELEGRAM_CHAT_ID }}
continue-on-error
:
true
continue-on-error
:
true
run
:
|
run
:
|
# 检查必要的环境变量
if [ -z "$TELEGRAM_BOT_TOKEN" ] || [ -z "$TELEGRAM_CHAT_ID" ]; then
echo "Telegram credentials not configured, skipping notification"
exit 0
fi
TAG_NAME=${GITHUB_REF#refs/tags/}
TAG_NAME=${GITHUB_REF#refs/tags/}
VERSION=${TAG_NAME#v}
VERSION=${TAG_NAME#v}
REPO="${{ github.repository }}"
REPO="${{ github.repository }}"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment