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 293c472 commit 86d8b1a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/tg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ jobs:
id: read_file
run: |
file_content=$(cat addressesapi.txt)
echo "::set-output name=file_content::${file_content}"
encoded_content=$(echo "$file_content" | base64)
echo "::set-output name=encoded_content::${encoded_content}"
- name: Get Beijing Time
id: time
Expand All @@ -37,6 +38,7 @@ jobs:
- name: 执行推送
run: |
message="For: ${{ steps.time.outputs.current_time }}
${{ steps.read_file.outputs.file_content }}"
$(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 86d8b1a

Please sign in to comment.