diff --git a/.gitea/workflows/ci-cd.yaml b/.gitea/workflows/ci-cd.yaml index 4836e61..1455c79 100644 --- a/.gitea/workflows/ci-cd.yaml +++ b/.gitea/workflows/ci-cd.yaml @@ -9,30 +9,23 @@ jobs: name: Build & Deploy runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v4 + - name: Clone repo + run: | + git clone --depth=1 --branch=main https://gitlab.impresion3d.pro/root/davidaragon-portfolio.git repo + cd repo && ls -la - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - with: - driver-opts: image=moby/buildkit:v0.12.5 + - name: Build image with docker + run: | + cd repo + docker build -t gitlab.impresion3d.pro/root/davidaragon-portfolio:latest . - name: Login to registry - uses: docker/login-action@v3 - with: - registry: gitlab.impresion3d.pro - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + run: | + echo "${{ secrets.DOCKER_PASSWORD }}" | docker login gitlab.impresion3d.pro -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin - - 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: Push image + run: | + docker push gitlab.impresion3d.pro/root/davidaragon-portfolio:latest - name: Stop Portainer stack run: |