run migrations in pipeline

This commit is contained in:
SennayT
2026-05-19 09:28:54 +03:00
parent ecd3b0aca8
commit 38e99e7bab
3 changed files with 12 additions and 1 deletions

View File

@@ -60,6 +60,7 @@ jobs:
# Build using the file
docker build --secret id=npmrc,src=.npmrc_temp -t edr-${{needs.environment.outputs.target}} .
docker build --secret id=npmrc,src=.npmrc_temp --target passenger-migration -t edr-passenger-migration-${{needs.environment.outputs.target}} . .
# Shred/Remove the sensitive file
rm .npmrc_temp
@@ -86,6 +87,11 @@ jobs:
- name: 📋 Copy ${{ matrix.service }} Environment
run: cp ~/environment/edr/${{needs.environment.outputs.target}}/${{ matrix.env_file }} .env
- name: 🧪 Run Passenger API migrations
if: ${{ matrix.service == 'passenger-api' }}
run: |
docker run --rm --env-file .env edr-passenger-migration-${{needs.environment.outputs.target}}
- name: 🚀 Start ${{ matrix.service }} Service
run: docker compose --project-name="edr-${{needs.environment.outputs.target}}" up -d --force-recreate ${{ matrix.service }} --build