From 612d5aa7ff9d3beabe0dfecba02c2dc3e14805ec Mon Sep 17 00:00:00 2001 From: Gato Date: Mon, 25 May 2026 08:19:31 +0200 Subject: [PATCH] Correction ci - 2 --- .gitea/workflows/sync-develop.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/sync-develop.yml b/.gitea/workflows/sync-develop.yml index d9f8168..6d07276 100644 --- a/.gitea/workflows/sync-develop.yml +++ b/.gitea/workflows/sync-develop.yml @@ -21,11 +21,19 @@ jobs: - name: Install curl run: apk add --no-cache curl + - name: Check API token access + run: | + STATUS=$(curl -s -o /tmp/api_response.json -w "%{http_code}" \ + -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ + "https://git.goutailler-olivier.com/api/v1/repos/${{ gitea.repository }}") + echo "GET /repos/${{ gitea.repository }} → HTTP $STATUS" + cat /tmp/api_response.json + - name: Create PR release → develop run: | RELEASE_BRANCH="${{ github.event.pull_request.head.ref }}" - curl --fail-with-body -X POST \ + STATUS=$(curl -s -o /tmp/pr_response.json -w "%{http_code}" -X POST \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Content-Type: application/json" \ -d "{ @@ -34,4 +42,7 @@ jobs: \"base\": \"develop\", \"body\": \"Synchronisation automatique après merge de ${RELEASE_BRANCH} dans main.\" }" \ - "https://git.goutailler-olivier.com/api/v1/repos/${{ gitea.repository }}/pulls" + "https://git.goutailler-olivier.com/api/v1/repos/${{ gitea.repository }}/pulls") + echo "POST /pulls → HTTP $STATUS" + cat /tmp/pr_response.json + [ "$STATUS" = "201" ] || exit 1