chore: build

This commit is contained in:
Xor290
2026-09-08 17:53:21 +02:00
parent 82f9a2fae9
commit 75b80b8f59
4 changed files with 76 additions and 35 deletions
+2 -14
View File
@@ -20,7 +20,6 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: "1.24.4"
check-latest: true
cache-dependency-path: backend/gestion/go.sum
- name: Download dependencies
@@ -69,7 +68,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
file: docker-pre-prod/backend/Dockerfile
file: docker-prod/backend/Dockerfile
target: runtime
push: true
tags: xor1234/backend-mln:${{ github.ref == 'refs/heads/main' && 'latest' || 'pre-prod' }}
@@ -79,18 +78,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
file: docker-pre-prod/backend/Dockerfile
file: docker-prod/backend/Dockerfile
target: waf
push: true
tags: xor1234/backend-mln:${{ github.ref == 'refs/heads/main' && 'waf' || 'waf-pre-prod' }}
- name: SSH Deploy
if: github.event_name == 'push'
uses: appleboy/ssh-action@v1
with:
host: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && secrets.SERVER_HOST_PROD || secrets.SERVER_HOST_PRE_PROD }}
username: ${{ secrets.SERVER_USER }}
key: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && secrets.SERVER_SSH_KEY_PROD || secrets.SERVER_SSH_KEY_PRE_PROD }}
script: |
docker compose -f ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && secrets.COMPOSE_PATH_PROD || secrets.COMPOSE_PATH_PRE_PROD }} pull backend waf
docker compose -f ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && secrets.COMPOSE_PATH_PROD || secrets.COMPOSE_PATH_PRE_PROD }} up -d --no-deps backend waf