From 293c472f6a527f844659a96849f065a6f0d1b33d Mon Sep 17 00:00:00 2001 From: CMLiussss Date: Sat, 13 Jan 2024 02:43:18 +0800 Subject: [PATCH] Update tg.yml --- .github/workflows/tg.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tg.yml b/.github/workflows/tg.yml index 80ffefa7e..3cba50d7b 100644 --- a/.github/workflows/tg.yml +++ b/.github/workflows/tg.yml @@ -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: | @@ -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"