feat: try fix ci cd
CI / 🧪 Tests Laravel (push) Successful in 2m13s
CI / 🐳 Build & Push Images (push) Successful in 1m5s

This commit is contained in:
2026-08-13 14:30:46 +02:00
parent 334d94e712
commit 8ef1a3cff8
4 changed files with 43 additions and 20 deletions
+24
View File
@@ -13,6 +13,9 @@ jobs:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configuration SSH
run: |
mkdir -p ~/.ssh
@@ -23,6 +26,27 @@ jobs:
-H "${{ secrets.DEPLOY_HOST }}" \
>> ~/.ssh/known_hosts
- name: Synchronisation de la configuration Docker
run: |
ssh \
-i ~/.ssh/id_ed25519 \
${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} \
"mkdir -p /data/stacks/bowli-api/docker/database-backup"
scp \
-i ~/.ssh/id_ed25519 \
docker-compose.prod.yml \
${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}:/data/stacks/bowli-api/docker-compose.yml
scp \
-i ~/.ssh/id_ed25519 \
docker/database-backup/restore-production \
${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}:/data/stacks/bowli-api/docker/database-backup/restore-production
ssh \
-i ~/.ssh/id_ed25519 \
${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} \
"chmod 755 /data/stacks/bowli-api/docker/database-backup/restore-production"
- name: 🚀 Deploy Docker
run: |
+12 -2
View File
@@ -54,7 +54,7 @@ jobs:
docker:
name: 🐳 Build & Push Image
name: 🐳 Build & Push Images
needs: test
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
@@ -75,7 +75,17 @@ jobs:
-t git.leonmorival.xyz/leonm/daily-meal-api:${{ github.sha }} \
.
- name: 📤 Push image
- name: 🏗️ Build database backup image
run: |
docker build \
-f docker/database-backup/Dockerfile \
-t git.leonmorival.xyz/leonm/daily-meal-postgres-tools:latest \
-t git.leonmorival.xyz/leonm/daily-meal-postgres-tools:${{ github.sha }} \
docker/database-backup
- name: 📤 Push images
run: |
docker push git.leonmorival.xyz/leonm/daily-meal-api:latest
docker push git.leonmorival.xyz/leonm/daily-meal-api:${{ github.sha }}
docker push git.leonmorival.xyz/leonm/daily-meal-postgres-tools:latest
docker push git.leonmorival.xyz/leonm/daily-meal-postgres-tools:${{ github.sha }}