Introduce using of gitea actions for updates #1

Merged
norohind merged 20 commits from actions-test into master 2023-09-09 19:06:48 +03:00
Showing only changes of commit c874a29c5a - Show all commits

View File

@ -1,12 +1,13 @@
import sys
import requests
import os
def send(_msg: str):
if len(_msg) == 0:
return
r = requests.post(
url='https://discord.com/api/webhooks/936927833572380692/QrqoK8aVCOkGFh1L0HaHPd_Z-Usj-ubhXYvHadZyCA1Y5GOB7-0xWmuyKI9l4byvKjQ1',
url=os.environ['DISCORD_WEBHOOK'],
data=f'content=```diff\n{requests.utils.quote(_msg)}```'.encode('utf-8'),
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
)