This commit is contained in:
Leon 2026-03-12 14:18:11 +01:00
parent a22a6f2268
commit feb660d55f
1 changed files with 3 additions and 2 deletions

View File

@ -6,6 +6,7 @@ on:
pull_request: pull_request:
branches: [ "main" ] branches: [ "main" ]
jobs: jobs:
test: test:
name: "Tests Unitaires" name: "Tests Unitaires"
@ -43,7 +44,7 @@ jobs:
uses: actions/docker/login@v2 uses: actions/docker/login@v2
with: with:
# Remplacez par l'URL de votre registry Gitea (ex: gitea.votre-domaine.com) # Remplacez par l'URL de votre registry Gitea (ex: gitea.votre-domaine.com)
registry: ${{ github.server_url }} registry: ${{ github.server_url }}
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITEA_TOKEN }} password: ${{ secrets.GITEA_TOKEN }}
@ -52,7 +53,7 @@ jobs:
IMAGE_NAME="${{ github.repository }}" # Format: user/repo IMAGE_NAME="${{ github.repository }}" # Format: user/repo
REGISTRY_URL=$(echo "${{ github.server_url }}" | sed -e 's|https://||') REGISTRY_URL=$(echo "${{ github.server_url }}" | sed -e 's|https://||')
FULL_IMAGE_NAME="$REGISTRY_URL/$IMAGE_NAME" FULL_IMAGE_NAME="$REGISTRY_URL/$IMAGE_NAME"
docker build -t "$FULL_IMAGE_NAME:${{ github.sha }}" -t "$FULL_IMAGE_NAME:latest" . docker build -t "$FULL_IMAGE_NAME:${{ github.sha }}" -t "$FULL_IMAGE_NAME:latest" .
docker push "$FULL_IMAGE_NAME:${{ github.sha }}" docker push "$FULL_IMAGE_NAME:${{ github.sha }}"
docker push "$FULL_IMAGE_NAME:latest" docker push "$FULL_IMAGE_NAME:latest"