Fix: Usar actions/checkout@v4 en workflow para resolver error de conectividad con Gitea
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m17s
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m17s
This commit is contained in:
@@ -17,21 +17,18 @@ jobs:
|
||||
POSTGRES_USER: ${{ vars.POSTGRES_USER }}
|
||||
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
|
||||
steps:
|
||||
- name: Checkout del repositorio
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build, push y deploy completo
|
||||
run: |
|
||||
set -e
|
||||
|
||||
echo "📦 Clonando repositorio..."
|
||||
git clone https://${{ github.repository_owner }}:${{ secrets.REGISTRY_PASSWORD }}@${{ vars.REGISTRY_URL }}/${{ github.repository }}.git /tmp/repo
|
||||
cd /tmp/repo
|
||||
git checkout ${{ github.sha }}
|
||||
|
||||
echo "🔐 Login al registry..."
|
||||
docker login ${{ vars.REGISTRY_URL }} -u ${{ secrets.REGISTRY_USERNAME }} -p ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
echo "🏗️ Construyendo imagen de Nuxt..."
|
||||
cd nuxt4
|
||||
docker build -t $REG/$REPO_OWNER/$APP_NAME:${{ github.sha }} -t $REG/$REPO_OWNER/$APP_NAME:latest .
|
||||
docker build -t $REG/$REPO_OWNER/$APP_NAME:${{ github.sha }} -t $REG/$REPO_OWNER/$APP_NAME:latest ./nuxt4
|
||||
|
||||
echo "📤 Subiendo imágenes..."
|
||||
docker push $REG/$REPO_OWNER/$APP_NAME:${{ github.sha }}
|
||||
@@ -43,8 +40,6 @@ jobs:
|
||||
echo " Image: $REG/$REPO_OWNER/$APP_NAME:latest"
|
||||
echo " Networks: principal, traefik-network"
|
||||
|
||||
cd /tmp/repo
|
||||
|
||||
echo "🔄 Descargando imágenes actualizadas..."
|
||||
docker compose pull
|
||||
|
||||
@@ -55,7 +50,3 @@ jobs:
|
||||
docker compose --project-name $APP_NAME up -d --remove-orphans --wait
|
||||
|
||||
echo "✅ Despliegue completado exitosamente!"
|
||||
|
||||
echo "🧼 Limpiando archivos temporales..."
|
||||
cd /
|
||||
rm -rf /tmp/repo
|
||||
|
||||
Reference in New Issue
Block a user