try fix ci cd
Laravel CI-CD (Gitea) / Tests Unitaires (push) Successful in 1m9s Details
Laravel CI-CD (Gitea) / Build & Push Docker (push) Failing after 4s Details
Laravel CI-CD (Gitea) / Déploiement Simplifié (push) Has been skipped Details

This commit is contained in:
Leon 2026-03-12 15:04:37 +01:00
parent a5a246ad50
commit 78f966271e
1 changed files with 17 additions and 11 deletions

View File

@ -21,7 +21,10 @@ jobs:
DB_DATABASE: ":memory:" DB_DATABASE: ":memory:"
with: with:
args: | 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: build:
name: "Build & Push Docker" name: "Build & Push Docker"
@ -33,24 +36,27 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Login to Gitea Registry - name: Login to Gitea Registry
# CORRECTION ICI : Le bon nom de l'action env:
uses: docker/login-action@v3 REGISTRY_URL: ${{ github.server_url }}
with: REGISTRY_USER: ${{ github.actor }}
registry: ${{ github.server_url }} REGISTRY_TOKEN: ${{ secrets.TOKEN_GITEA }}
username: ${{ github.actor }} run: |
password: ${{ secrets.TOKEN_GITEA }} REGISTRY="${REGISTRY_URL#https://}"
REGISTRY="${REGISTRY#http://}"
echo "$REGISTRY_TOKEN" | docker login "$REGISTRY" -u "$REGISTRY_USER" --password-stdin
- name: Build and Push - name: Build and Push
run: | run: |
# On extrait le domaine du serveur (ex: gitea.leonmorival.com) # On utilise l'image du serveur Gitea
REGISTRY=$(echo "${{ github.server_url }}" | sed -e 's|https://||') REGISTRY="${{ github.server_url }}"
REGISTRY="${REGISTRY#https://}"
REGISTRY="${REGISTRY#http://}"
IMAGE="$REGISTRY/${{ github.repository }}:latest" IMAGE="$REGISTRY/${{ github.repository }}:latest"
docker build -t "$IMAGE" . docker build -t "$IMAGE" .
docker push "$IMAGE" docker push "$IMAGE"
deploy: deploy:
name: "Déploiement Portainer" name: "Déploiement Simplifié"
needs: build needs: build
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest runs-on: ubuntu-latest