try fix ci cd
This commit is contained in:
parent
a5a246ad50
commit
78f966271e
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue