Personnal update notification
Closed this issue · 1 comments
A-d-r-i commented
Add in PACKAGENAME.yml
- name: Script
env:
TELEGRAM: ${{ secrets.TELEGRAM }}
CHAT_ID: ${{ secrets.CHAT_ID }}
Add in send_PACKAGENAME.ps1
:
#send telegram notification
Function Send-Telegram {
Param([Parameter(Mandatory=$true)][String]$Message)
$Telegramtoken = "$env:TELEGRAM"
$Telegramchatid = "$env:CHAT_ID"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$Response = Invoke-RestMethod -Uri "https://api.telegram.org/bot$($Telegramtoken)/sendMessage?chat_id=$($Telegramchatid)&text=$($Message)"}
Send-Telegram -Message "[UCP] New update of PACKAGENAME : $tag"
A-d-r-i commented
Added, if necessary: https://api.telegram.org/bot<TELEGRAM_TOKEN>/getUpdates