From afabea33becf6c8bad32300de57a77ed9918e1b8 Mon Sep 17 00:00:00 2001 From: Youssef Date: Sun, 31 May 2026 00:17:44 +0200 Subject: [PATCH] ci: update pipeline --- .gitea/workflows/ci.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index fb3bb77..8241363 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -10,8 +10,11 @@ jobs: name: Build & Run Unit Tests runs-on: self-hosted steps: - - name: Checkout code - uses: actions/checkout@v4 + # 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 . + git checkout ${{ github.sha }} - name: Run Maven Tests in Docker run: | @@ -26,10 +29,12 @@ jobs: needs: test runs-on: self-hosted steps: - - name: Checkout code - uses: actions/checkout@v4 + - name: Clone repository + run: | + git clone --depth 1 https://oauth2:${{ secrets.GITHUB_TOKEN }}@${{ github.server_url }}/${{ github.repository }}.git . + git checkout ${{ github.sha }} - name: Deploy with Docker Compose run: | docker compose down app || true - docker compose up -d --build app \ No newline at end of file + docker compose up -d --build app