Upload GitHub backup #207
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upload GitHub backup | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 */2 * *" | |
jobs: | |
backup: | |
runs-on: ubuntu-latest | |
container: debian:11-slim | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install packages | |
run: | | |
apt update | |
apt install python3 python3-distutils git sudo curl -y | |
- name: Install Python3 requirements | |
run: | | |
sudo curl https://bootstrap.pypa.io/get-pip.py | python3 | |
sudo pip3 install -r requirements.txt | |
- name: Execute backup | |
env: | |
LOGURU_COLORIZE: NO | |
YANDEX_TOKEN: ${{ secrets.YANDEX_TOKEN }} | |
GITHUB_ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
run: | | |
sudo python3 backup_github.py --github-token $GITHUB_ACCESS_TOKEN --yd-token $YANDEX_TOKEN -a "user|ZhymabekRoman" -a "org|Freedium-cfd" -a "org|Scorebook-Fruit-Seizing" |