Skip to content

Commit 528aac6

Browse files
committed
Merge branch 'main' of github.com:doveppp/linuxdo-checkin
2 parents 39b1ae4 + c2d0704 commit 528aac6

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

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

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,28 @@ 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 \
46-
-d text="❌ <b>LINUX DO</b> 每日签到失败"
52+
-d text="❌ <b>LINUX DO</b> 每日签到失败"
4753
4854
- name: Delete workflow runs
4955
uses: Mattraks/delete-workflow-runs@v2

0 commit comments

Comments
 (0)