Skip to content

Commit

Permalink
CI: send percentage completion of year to telegram
Browse files Browse the repository at this point in the history
Change-Id: I2ecd5729c232a0ef1895bb0c780dd099c7b16bd5
  • Loading branch information
mvaisakh committed Feb 13, 2024
1 parent 693c44f commit 4820aab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/toolchain-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,6 @@ jobs:
steps:
- 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!"
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."

0 comments on commit 4820aab

Please sign in to comment.