diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index b0e2fa8..8e65115 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -1,29 +1,25 @@ -name: Deploy Afropreunariat +name: Build and Push App on: push: - branches: - - main + branches: [ "main" ] # Déclenche le build au push sur la branche main jobs: - build-and-push: + build: runs-on: ubuntu-latest steps: - - name: Checkout + - name: Checkout code uses: actions/checkout@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + - name: Login to Gitea Registry + run: | + # Utilise le secret GITEA_TOKEN que tu as ajouté dans les paramètres du dépôt + echo "${{ secrets.GITEA_TOKEN }}" | docker login git.home.arrondeau.fr -u ${{ gitea.actor }} --password-stdin - - name: Login to Registry - uses: docker/login-action@v2 - with: - registry: git.home.arrondeau.fr - username: ${{ github.actor }} - password: ${{ secrets.TOKEN }} - - - name: Build and Push - uses: docker/build-push-action@v4 - with: - context: . - push: true - tags: git.home.arrondeau.fr/streaper2/afropreunariat:latest \ No newline at end of file + - name: Build and Push Docker Image + run: | + # Construction de l'image + # Le Dockerfile doit contenir l'installation d'openssl pour Prisma + docker build -t git.home.arrondeau.fr/${{ gitea.repository }}:latest . + + # Envoi vers la registry Gitea + docker push git.home.arrondeau.fr/${{ gitea.repository }}:latest \ No newline at end of file