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:
|
steps:
|
||||||
- name: Download bot
|
- name: Download bot
|
||||||
run: |
|
run: |
|
||||||
$botRelease = (Invoke-WebRequest 'https://api.github.com/repos/bs-community/telegram-bot/releases/latest').Content | ConvertFrom-Json
|
$headers = @{ Authorization: 'Bearer ${{ secrets.GITHUB_TOKEN }}' }
|
||||||
$botBinUrl = ((Invoke-WebRequest $botRelease.assets_url).Content | ConvertFrom-Json).browser_download_url
|
$botRelease = (Invoke-WebRequest -Headers $headers 'https://api.github.com/repos/bs-community/telegram-bot/releases/latest').Content | ConvertFrom-Json
|
||||||
bash -c "curl -fSL $botBinUrl -o bot"
|
$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
|
chmod +x ./bot
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
- name: Run bot
|
- name: Run bot
|
||||||
|
Loading…
Reference in New Issue
Block a user