diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 77c94e0..55802a7 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -21,7 +21,10 @@ jobs: DB_DATABASE: ":memory:" with: args: | - bash -c "composer install --no-interaction && php artisan test" + bash -c "apt-get update && apt-get install -y libicu-dev && \ + docker-php-ext-configure intl && docker-php-ext-install intl && \ + composer install --no-interaction && \ + php artisan test" build: name: "Build & Push Docker" @@ -33,24 +36,27 @@ jobs: uses: actions/checkout@v4 - name: Login to Gitea Registry - # CORRECTION ICI : Le bon nom de l'action - uses: docker/login-action@v3 - with: - registry: ${{ github.server_url }} - username: ${{ github.actor }} - password: ${{ secrets.TOKEN_GITEA }} + env: + REGISTRY_URL: ${{ github.server_url }} + REGISTRY_USER: ${{ github.actor }} + REGISTRY_TOKEN: ${{ secrets.TOKEN_GITEA }} + run: | + REGISTRY="${REGISTRY_URL#https://}" + REGISTRY="${REGISTRY#http://}" + echo "$REGISTRY_TOKEN" | docker login "$REGISTRY" -u "$REGISTRY_USER" --password-stdin - name: Build and Push run: | - # On extrait le domaine du serveur (ex: gitea.leonmorival.com) - REGISTRY=$(echo "${{ github.server_url }}" | sed -e 's|https://||') + # On utilise l'image du serveur Gitea + REGISTRY="${{ github.server_url }}" + REGISTRY="${REGISTRY#https://}" + REGISTRY="${REGISTRY#http://}" IMAGE="$REGISTRY/${{ github.repository }}:latest" - docker build -t "$IMAGE" . docker push "$IMAGE" deploy: - name: "Déploiement Portainer" + name: "Déploiement Simplifié" needs: build if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest