Skip to content

Commit

Permalink
CI to downgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
dyakovri committed May 15, 2024
1 parent d82fe73 commit 477b463
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/downgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Downgrade

on:
workflow_dispatch:
inputs:
version:
description: 'Version to downgrade to'
required: true
default: 'head'
environment:
description: 'Environment to run tests against'
type: environment
required: true


jobs:
migrate:
name: Migrate DB ${{ inputs.environment }} to ${{ inputs.version }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
environment:
name: ${{ inputs.environment }}
env:
ENVIRONMENT: ${{ inputs.environment }}
DB_DSN: ${{ secrets.DB_DSN }}

steps:
- uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m ensurepip
pip install -r requirements.txt -r requirements.dev.txt
- name: Migrate DB
run: |
alembic downgrade ${{ inputs.version }}

0 comments on commit 477b463

Please sign in to comment.