From d19bde044fb82143a2cc152068967fb8a941b956 Mon Sep 17 00:00:00 2001 From: Tino Goratsch Date: Mon, 4 Dec 2023 10:41:35 +0100 Subject: [PATCH] feat: use a separate step for enabling the auto-merge of the PRs --- .github/workflows/release-please.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index ff5e63b..931ca82 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -36,6 +36,12 @@ jobs: if: ${{ steps.release.outputs.release_created }} run: | (gh pr --repo $GITHUB_REPOSITORY create --fill --title "chore(main): Merge changes from main into develop" --base develop) || exit 0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Enable auto-merge for the PR + if: ${{ steps.release.outputs.release_created }} + run: | pull_request_url=$(gh pr view release/merge-main-into-develop --json url --jq '. | .url') gh pr --repo $GITHUB_REPOSITORY review $pull_request_url --approve gh pr --repo $GITHUB_REPOSITORY merge $pull_request_url --auto --merge