ci: apply migrations before starting staging containers
CI / Сборка (push) Successful in 41s
CI / Деплой на стейджинг (push) Failing after 10s
CI / Проверка кода (push) Successful in 20s

This commit is contained in:
arswarog committed 2026-11-16 18:53:50 +03:00
1 parent c22d484c11
commit a80cb9fea7
4 files changed
+38 -1

No files matched your search

+10
View File
@@ -48,6 +48,15 @@ jobs:
labels: |
org.opencontainers.image.ref.name=${{ github.head_ref || github.ref_name }}
- name: Build migrate docker image
uses: docker/build-push-action@v7
with:
context: .
file: Dockerfile.migrate
push: true
tags: git.jt4d.ru/${{ github.repository }}/api:${{ github.head_ref || github.ref_name }}-migrate
cache-from: git.jt4d.ru/${{ github.repository }}/api:latest
deploy-staging:
name: Деплой на стейджинг
runs-on: ubuntu-latest
@@ -78,6 +87,7 @@ jobs:
sed -i "s/\${BRANCH}/$BRANCH/g" docker-compose.yml
docker compose pull --quiet
staging-db-postgres create "${{ github.repository }}" "$BRANCH"
docker compose run --rm migrate
docker compose down
docker compose up -d