From 30ab21cb34078e26739d2f50c19a3330e6f4d713 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 12 Aug 2024 15:46:18 +0300 Subject: [PATCH] Action fix. --- .github/workflows/Telegram Notifications.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Telegram Notifications.yml b/.github/workflows/Telegram Notifications.yml index 592c03d..ccf7f01 100644 --- a/.github/workflows/Telegram Notifications.yml +++ b/.github/workflows/Telegram Notifications.yml @@ -23,6 +23,18 @@ jobs: - name: Send Telegram Notification run: | - python -c "import asyncio; from telegram import Bot; async def send_message(): bot = Bot(token='${{ secrets.TELEGRAM_BOT_TOKEN }}'); chat_id = '${{ secrets.TELEGRAM_CHANNEL_ID }}'; commit_link = '${{ github.event.commits[0].url }}'; await bot.send_message(chat_id=chat_id, text=f'New commit! {commit_link}'); await send_message()" + python -c " +import asyncio +from telegram import Bot + +async def send_message(): + bot = Bot(token='${{ secrets.TELEGRAM_BOT_TOKEN }}') + chat_id = '${{ secrets.TELEGRAM_CHANNEL_ID }}' + commit_link = '${{ github.event.head_commit.url }}' + await bot.send_message(chat_id=chat_id, text=f'New commit! {commit_link}') + +asyncio.run(send_message()) +" +