fix fetching Telegram bot

This commit is contained in:
Pig Fang 2020-07-04 15:21:43 +08:00
parent 96a3f5d987
commit b44d0724ef
No known key found for this signature in database
GPG Key ID: A8198F548DADA9E2

View File

@ -12,7 +12,7 @@ jobs:
steps:
- name: Download bot
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
$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"