diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index ca19d46..6f77b83 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -20,17 +20,20 @@ jobs: container: image: maven:3.9.6-eclipse-temurin-21 options: --memory=8g + volumes: + - /var/run/docker.sock:/var/run/docker.sock steps: - - name: Install git, node, gcc, and basic tools + - name: Install git, node, gcc, docker, and basic tools run: | apt-get update - apt-get install -y git curl ca-certificates build-essential zlib1g-dev + apt-get install -y git curl ca-certificates build-essential zlib1g-dev docker.io curl -fsSL https://deb.nodesource.com/setup_22.x | bash - apt-get install -y nodejs rm -rf /var/lib/apt/lists/* git --version node --version gcc --version + docker --version - name: Checkout uses: actions/checkout@v4 @@ -73,11 +76,13 @@ jobs: docker build -t shot-crafter-calculator:ci . echo "=== Login to Gitea Registry ===" echo "${{ secrets.REGISTRY_TOKEN }}" | docker login gitea.danielarroyo.cl -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin + SHORT_SHA="${GITHUB_SHA::7}" echo "=== Tag ===" docker tag shot-crafter-calculator:ci gitea.danielarroyo.cl/proyectos/shot-crafter-calculator:latest - docker tag shot-crafter-calculator:ci gitea.danielarroyo.cl/proyectos/shot-crafter-calculator:${GITHUB_SHA::7} + docker tag shot-crafter-calculator:ci gitea.danielarroyo.cl/proyectos/shot-crafter-calculator:${SHORT_SHA} echo "=== Push ===" docker push gitea.danielarroyo.cl/proyectos/shot-crafter-calculator:latest - docker push gitea.danielarroyo.cl/proyectos/shot-crafter-calculator:${GITHUB_SHA::7} + docker push gitea.danielarroyo.cl/proyectos/shot-crafter-calculator:${SHORT_SHA} echo "=== Logout ===" docker logout gitea.danielarroyo.cl + echo "=== Done ==="