Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix migrations-check.yml workflow #790

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions .github/workflows/migrations-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,18 @@ jobs:
echo DATABASE_URL="postgresql+asyncpg://postgres:password@db/almalinux-bs" >> ./vars.env
echo SYNC_DATABASE_URL="postgresql+psycopg2://postgres:password@db/almalinux-bs" >> ./vars.env
echo PULP_DATABASE_URL="postgresql+psycopg2://postgres:password@db/almalinux-bs" >> ./vars.env
- uses: isbang/compose-action@v1.5.1
name: Run docker-compose
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v5
with:
# Use this if you change something in Dockerfile
# up-flags: --build --no-deps
up-flags: "--pull always --no-build --no-deps"
down-flags: "--volumes"
services: |
db
web_server
- name: Check migratrions
run: docker-compose run --rm --no-deps web_server alembic --config alws/alembic.ini upgrade head
context: .
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Start services
run: docker compose up -d --no-deps web_server db
- name: Check migrations
run: docker compose run --rm --no-deps web_server alembic --config alws/alembic.ini upgrade head
- name: Stop services
run: docker compose down --volumes
Loading