Skip to content

Commit

Permalink
CI: fix telegram message push
Browse files Browse the repository at this point in the history
Change-Id: I5a86ef378c73bf4b79633b6c5d40d351aa91e01a
  • Loading branch information
mvaisakh committed Feb 13, 2024
1 parent 4820aab commit 391b28d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/toolchain-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,6 @@ jobs:
- name: Send telegram messages
run: |
curl -s -X POST "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" -d chat_id="${CHAT_ID}" -d "disable_web_page_preview=true" -d "parse_mode=html" -d text="It's $(date +%A) my dudes!"
percentage=$(date +'%j' | awk '{print int($0 / 366 * 100)}')
curl -s -X POST "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" -d chat_id="${CHAT_ID}" -d "disable_web_page_preview=true" -d "parse_mode=html" -d text="The year is $(percentage)% complete. Time is flying."
echo "percentage=$(date +'%j' | awk '{print int($0 / 365 * 100)}')" >> $GITHUB_ENV
curl -s -X POST "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" -d chat_id="${CHAT_ID}" -d "disable_web_page_preview=true" -d "parse_mode=html" -d text="The year is '${{ env.percentage }}'% complete. Time is flying."

0 comments on commit 391b28d

Please sign in to comment.