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 3fb803d commit 293c472
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/tg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ jobs:
with:
python-version: 3.8

- name: 读取文件内容
id: read_file
run: |
file_content=$(cat addressesapi.txt)
echo "::set-output name=file_content::${file_content}"
- name: Get Beijing Time
id: time
run: |
Expand All @@ -30,7 +36,7 @@ jobs:
- name: 执行推送
run: |
message="今日优选 For: ${{ steps.time.outputs.current_time }}
"
message="For: ${{ steps.time.outputs.current_time }}
${{ steps.read_file.outputs.file_content }}"
wget -qO- "https://api.telegram.org/bot${{ secrets.TG_BOT_TOKEN }}/sendMessage?chat_id=${{ secrets.TG_TESTPD_ID }}&text=$message"

0 comments on commit 293c472

Please sign in to comment.