From 47bf985a79ebdfe4aa0148fec3773e88aa60185b Mon Sep 17 00:00:00 2001 From: wh-leader Date: Mon, 11 May 2026 11:25:29 +0200 Subject: [PATCH] fix: use official Docker actions like WarrantyHub workflow --- .gitea/workflows/ci-cd.yaml | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/ci-cd.yaml b/.gitea/workflows/ci-cd.yaml index 02ccb5f..826dbd9 100644 --- a/.gitea/workflows/ci-cd.yaml +++ b/.gitea/workflows/ci-cd.yaml @@ -12,16 +12,27 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Build and Push Docker Image - run: | - # Login to registry - echo "${{ secrets.DOCKER_PASSWORD }}" | docker login gitlab.impresion3d.pro -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin - - # Build image - docker build -t gitlab.impresion3d.pro/root/davidaragon-portfolio:latest . - - # Push to registry - docker push gitlab.impresion3d.pro/root/davidaragon-portfolio:latest + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + driver-opts: image=moby/buildkit:v0.12.5 + + - name: Login to registry + uses: docker/login-action@v3 + with: + registry: gitlab.impresion3d.pro + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push image + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64 + push: true + tags: | + gitlab.impresion3d.pro/root/davidaragon-portfolio:latest - name: Deploy to Portainer run: |