ytdlbot/.github/workflows/upgrade.yml

26 lines
752 B
YAML
Raw Normal View History

2022-01-03 02:26:03 +00:00
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: |
2022-01-03 06:30:17 +00:00
docker save bennythink/ytdlbot > ~/ytdlbot-old.tar
cd /home/ytdlbot
2022-01-03 02:26:03 +00:00
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!"