From ecde6a7b68f5098d958ad59ee24a91fe7c6ba150 Mon Sep 17 00:00:00 2001 From: Youssef Date: Sun, 31 May 2026 00:33:29 +0200 Subject: [PATCH] ci: corriger le protocole double https dans le clone manuel --- .gitea/workflows/ci.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 8241363..cc44d5e 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -10,10 +10,12 @@ jobs: name: Build & Run Unit Tests runs-on: self-hosted steps: - # Remplacement de actions/checkout par un clone Git manuel sécurisé - name: Clone repository run: | - git clone --depth 1 https://oauth2:${{ secrets.GITHUB_TOKEN }}@${{ github.server_url }}/${{ github.repository }}.git . + SERVER_URL="${{ github.server_url }}" + SERVER_NO_PROTO="${SERVER_URL#http://}" + SERVER_NO_PROTO="${SERVER_NO_PROTO#https://}" + git clone --depth 1 "https://oauth2:${{ secrets.GITHUB_TOKEN }}@${SERVER_NO_PROTO}/${{ github.repository }}.git" . git checkout ${{ github.sha }} - name: Run Maven Tests in Docker @@ -31,7 +33,10 @@ jobs: steps: - name: Clone repository run: | - git clone --depth 1 https://oauth2:${{ secrets.GITHUB_TOKEN }}@${{ github.server_url }}/${{ github.repository }}.git . + SERVER_URL="${{ github.server_url }}" + SERVER_NO_PROTO="${SERVER_URL#http://}" + SERVER_NO_PROTO="${SERVER_NO_PROTO#https://}" + git clone --depth 1 "https://oauth2:${{ secrets.GITHUB_TOKEN }}@${SERVER_NO_PROTO}/${{ github.repository }}.git" . git checkout ${{ github.sha }} - name: Deploy with Docker Compose