From 86d8b1a12c61a12c69cfe8370e5bb3abd9d5124a Mon Sep 17 00:00:00 2001 From: CMLiussss Date: Sat, 13 Jan 2024 02:46:06 +0800 Subject: [PATCH] Update tg.yml --- .github/workflows/tg.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tg.yml b/.github/workflows/tg.yml index 3cba50d7b..59b19477a 100644 --- a/.github/workflows/tg.yml +++ b/.github/workflows/tg.yml @@ -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 @@ -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"