chore(ci): manual notification push
This commit is contained in:
parent
81b7d0d7b7
commit
c0112c7e25
29
.github/workflows/Telegram.yml
vendored
29
.github/workflows/Telegram.yml
vendored
|
|
@ -14,23 +14,24 @@ on:
|
||||||
- 'routes/**'
|
- 'routes/**'
|
||||||
- '*.lock'
|
- '*.lock'
|
||||||
- 'webpack.*'
|
- 'webpack.*'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
notification:
|
notification:
|
||||||
name: Send Message
|
name: Send Message
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Download bot
|
- name: Download bot
|
||||||
run: |
|
run: |
|
||||||
$headers = @{ Authorization = 'Bearer ${{ secrets.GITHUB_TOKEN }}' }
|
$headers = @{ Authorization = 'Bearer ${{ secrets.GITHUB_TOKEN }}' }
|
||||||
$botRelease = (Invoke-WebRequest -Headers $headers 'https://api.github.com/repos/bs-community/telegram-bot/releases/latest').Content | ConvertFrom-Json
|
$botRelease = (Invoke-WebRequest -Headers $headers 'https://api.github.com/repos/bs-community/telegram-bot/releases/latest').Content | ConvertFrom-Json
|
||||||
$botBinUrl = ((Invoke-WebRequest -Headers $headers $botRelease.assets_url).Content | ConvertFrom-Json).browser_download_url
|
$botBinUrl = ((Invoke-WebRequest -Headers $headers $botRelease.assets_url).Content | ConvertFrom-Json).browser_download_url
|
||||||
bash -c "curl --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -fSL $botBinUrl -o bot"
|
bash -c "curl --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -fSL $botBinUrl -o bot"
|
||||||
chmod +x ./bot
|
chmod +x ./bot
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
- name: Run bot
|
- name: Run bot
|
||||||
run: ./bot diff
|
run: ./bot diff
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
env:
|
env:
|
||||||
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
||||||
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user