This commit is contained in:
Pig Fang 2019-12-10 18:38:10 +08:00
parent 4a6ad15217
commit dec36d0771
2 changed files with 8 additions and 7 deletions

View File

@ -10,8 +10,15 @@ jobs:
name: Send Message
runs-on: ubuntu-latest
steps:
- name: Download bot
run: |
$botRelease = (Invoke-WebRequest 'https://api.github.com/repos/bs-community/telegram-bot/releases/latest').Content | ConvertFrom-Json
$botBinUrl = ((Invoke-WebRequest $botRelease.assets_url).Content | ConvertFrom-Json).browser_download_url
bash -c "curl -fSL $botBinUrl -o bot"
chmod +x ./bot
shell: pwsh
- name: Run bot
run: ./scripts/bot.ps1
run: ./bot diff
shell: pwsh
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}

View File

@ -1,6 +0,0 @@
$botRelease = (Invoke-WebRequest 'https://api.github.com/repos/bs-community/telegram-bot/releases/latest').Content | ConvertFrom-Json
$botBinUrl = ((Invoke-WebRequest $botRelease.assets_url).Content | ConvertFrom-Json).browser_download_url
bash -c "curl -fSL $botBinUrl -o bot"
chmod +x ./bot
./bot diff