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

This commit is contained in:
Leon 2026-03-12 16:00:02 +01:00
parent acf9f5c772
commit 069f70aa76
1 changed files with 22 additions and 21 deletions

View File

@ -2,13 +2,14 @@ name: Laravel CI-CD (Gitea)
on:
push:
branches: [ "main" ]
branches: ["main"]
jobs:
test:
name: "Tests Unitaires"
test:
name: "Tests Unitaires"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
@ -21,20 +22,20 @@ test:
DB_CONNECTION: sqlite
DB_DATABASE: ":memory:"
with:
# AJOUT de --ignore-platform-req=ext-intl
args: |
bash -c "composer install --no-interaction --ignore-platform-req=ext-intl && php artisan test"
build:
name: "Build & Push Docker"
needs: test
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to Gitea Registry
uses: docker/login-action@v3 # L'action officielle est plus simple !
uses: docker/login-action@v3
with:
registry: ${{ github.server_url }}
username: ${{ github.actor }}
@ -42,7 +43,6 @@ test:
- name: Build and Push
run: |
# On nettoie l'URL pour Docker (enlève https://)
REGISTRY_DOMAIN=$(echo "${{ github.server_url }}" | sed -e 's|https://||' -e 's|http://||')
IMAGE="$REGISTRY_DOMAIN/${{ github.repository }}:latest"
@ -53,6 +53,7 @@ test:
name: "Déploiement Simplifié"
needs: build
runs-on: ubuntu-latest
steps:
- name: Trigger Portainer Webhook
run: curl -X POST "${{ secrets.PORTAINER_WEBHOOK_URL }}"