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