add token to fetch bot binary
This commit is contained in:
parent
a6c10ced20
commit
96a3f5d987
7
.github/workflows/Telegram.yml
vendored
7
.github/workflows/Telegram.yml
vendored
@ -12,9 +12,10 @@ jobs:
|
||||
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"
|
||||
$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"
|
||||
chmod +x ./bot
|
||||
shell: pwsh
|
||||
- name: Run bot
|
||||
|
Loading…
Reference in New Issue
Block a user