From 5c91e6fd048b647f6be9f029b2a9feafc7039fe4 Mon Sep 17 00:00:00 2001 From: Nikita Andriyanov Date: Tue, 4 Feb 2025 15:23:01 +0300 Subject: [PATCH] add migration --- .github/workflows/deploy.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index f999f0d..d48324a 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -9,6 +9,10 @@ on: required: false type: boolean default: false + migrate: + required: false + type: boolean + default: false environment: type: string required: true @@ -48,6 +52,10 @@ jobs: done source .env cat .env + - name: Migrate + if: ${{ inputs.migrate == true }} + run: | + docker run -it --rm backend-users-test alembic upgrade head --env-file=.env - name: Deploy env: DOCKER_HOST: tcp://${{ inputs.host }}:2376