Skip to content

Commit

Permalink
Update tg.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cmliu authored Jan 12, 2024
1 parent 27e3938 commit e22ffa5
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions .github/workflows/tg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ jobs:
with:
python-version: 3.8

- name: 读取文件内容
id: read_file
run: |
file_content=$(cat addressesapi.txt)
encoded_content=$(echo "$file_content" | sed 's/#/, /g' | base64)
echo "::set-output name=encoded_content::${encoded_content}"
- name: Get Beijing Time
id: time
run: |
Expand All @@ -30,24 +37,8 @@ jobs:
- name: 执行推送
run: |
message="For: ${{ steps.time.outputs.current_time }}
message="今日优选 For: ${{ steps.time.outputs.current_time }}
158.101.154.245:47001,JP
158.178.228.8:10010,SG
113.61.250.18:19888,TW
124.156.147.158:32797,HK
||43.128.6.137:10001||,HK
183.106.47.32:10095,KR
59.14.62.90:10095,KR
211.222.187.4:27017#KR
222.98.161.53:10081#KR
23.92.222.254:10021#US
38.180.64.11:2023#GB
165.227.179.133:7443#US
154.9.237.167:20004#US
198.46.151.62:3443#US
149.28.100.40:33333#US
45.95.175.254:4437#FR
107.173.156.101:10001#US"
$(echo "${{ steps.read_file.outputs.encoded_content }}" | base64 -d)"
wget -qO- "https://api.telegram.org/bot${{ secrets.TG_BOT_TOKEN }}/sendMessage?chat_id=${{ secrets.TG_TESTPD_ID }}&text=$message"

0 comments on commit e22ffa5

Please sign in to comment.