Skip to content

Commit c2d0704

Browse files
authored
Merge pull request doveppp#13 from KiritoXDone/dev
fix: 修复 workflows 无法启动
2 parents 11b2f10 + 859bfd8 commit c2d0704

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

.github/workflows/daily-check-in.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,26 @@ jobs:
2828
PASSWORD: ${{ secrets.PASSWORD }}
2929
run: |
3030
python main.py
31-
31+
3232
- name: Send Telegram Notification
33-
if: ${{ success() && secrets.TELEGRAM_TOKEN != '' && secrets.TELEGRAM_USERID != '' }}
33+
env:
34+
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
35+
TELEGRAM_USERID: ${{ secrets.TELEGRAM_USERID }}
36+
if: ${{ success() && env.TELEGRAM_TOKEN != '' && env.TELEGRAM_USERID != '' }}
3437
run: |
35-
curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage" \
36-
-d chat_id=${{ secrets.TELEGRAM_USERID }} \
38+
curl -s -X POST "https://api.telegram.org/bot${{ env.TELEGRAM_TOKEN }}/sendMessage" \
39+
-d chat_id=${{ env.TELEGRAM_USERID }} \
3740
-d parse_mode=HTML \
3841
-d text="✅ <b>LINUX DO</b> 每日签到成功完成"
3942
4043
- name: Send Failure Notification
41-
if: ${{ failure() && secrets.TELEGRAM_TOKEN != '' && secrets.TELEGRAM_USERID != '' }}
44+
env:
45+
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
46+
TELEGRAM_USERID: ${{ secrets.TELEGRAM_USERID }}
47+
if: ${{ failure() && env.TELEGRAM_TOKEN != '' && env.TELEGRAM_USERID != '' }}
4248
run: |
43-
curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage" \
44-
-d chat_id=${{ secrets.TELEGRAM_USERID }} \
49+
curl -s -X POST "https://api.telegram.org/bot${{ env.TELEGRAM_TOKEN }}/sendMessage" \
50+
-d chat_id=${{ env.TELEGRAM_USERID }} \
4551
-d parse_mode=HTML \
4652
-d text="❌ <b>LINUX DO</b> 每日签到失败"
4753

0 commit comments

Comments
 (0)