From d460b8f518cacdac714394aab5d30e4c4f3f1a69 Mon Sep 17 00:00:00 2001 From: Gato Date: Mon, 25 May 2026 06:37:40 +0200 Subject: [PATCH] job sync develop --- .gitea/workflows/sync-develop.yml | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .gitea/workflows/sync-develop.yml diff --git a/.gitea/workflows/sync-develop.yml b/.gitea/workflows/sync-develop.yml new file mode 100644 index 0000000..f70ab3a --- /dev/null +++ b/.gitea/workflows/sync-develop.yml @@ -0,0 +1,34 @@ +name: Sync release into develop + +on: + pull_request: + types: + - closed + branches: + - main + +jobs: + sync-develop: + if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/') + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: https://github.com/actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.RELEASE_TOKEN }} + + - name: Create PR release → develop + run: | + RELEASE_BRANCH="${{ github.event.pull_request.head.ref }}" + + curl -X POST \ + -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ + -H "Content-Type: application/json" \ + -d "{ + \"title\": \"chore: sync ${RELEASE_BRANCH} into develop\", + \"head\": \"${RELEASE_BRANCH}\", + \"base\": \"develop\", + \"body\": \"Synchronisation automatique après merge de ${RELEASE_BRANCH} dans main.\" + }" \ + "${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/pulls" \ No newline at end of file