ytdlbot/.github/workflows/upgrade.yml
2022-01-03 14:30:17 +08:00

26 lines
752 B
YAML

name: Upgrade
on:
push:
tags:
- "v*"
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using ssh key
uses: appleboy/ssh-action@master
env:
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
with:
envs: BOT_TOKEN
host: ${{ secrets.YTDL_BOT_HOST }}
username: root
key: ${{ secrets.SSH_KEY }}
script: |
docker save bennythink/ytdlbot > ~/ytdlbot-old.tar
cd /home/ytdlbot
make bot
make upgrade-all-worker
curl "https://api.telegram.org/bot$BOT_TOKEN/sendMessage?chat_id=260260121&text=ytdl%20upgrade%20complete!"
echo "YouTube Download upgrade complete!"