db_backup_scaleway #16
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: db_backup_scaleway | |
on: | |
workflow_dispatch: # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch | |
schedule: # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule | |
- cron: '0 0 * * 0' # every Sunday at 00:00 | |
env: | |
PYTHON_VERSION: '3.10' | |
POETRY_VERSION: '1.2.1' | |
jobs: | |
db_backup: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- uses: actions/checkout@v2 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: ${{ env.POETRY_VERSION }} | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Verify poetry.lock agrees with pyproject.toml | |
run: poetry lock --check | |
- name: Install dependencies | |
run: poetry install --no-interaction --no-ansi | |
- name: RunBackupDBScript | |
run: | | |
poetry run python quotaclimat/data_ingestion/scaleway_db_backups.py -p ${{ secrets.D4G_VM_DB_PWD }} -k ${{ secrets.SCALEWAY_KEY_ID }} -a ${{ secrets.SCALEWAY_ACCESS_KEY }} | |