From 8980688df58baa1717d5326f56e58d9a28a0546e Mon Sep 17 00:00:00 2001 From: Alex B <45384811+AB-xdev@users.noreply.github.com> Date: Mon, 2 Oct 2023 12:46:22 +0200 Subject: [PATCH] Update update-from-template.yml --- .github/workflows/update-from-template.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/update-from-template.yml b/.github/workflows/update-from-template.yml index ab0b49e..2b41fdd 100644 --- a/.github/workflows/update-from-template.yml +++ b/.github/workflows/update-from-template.yml @@ -81,12 +81,14 @@ jobs: echo "abort=0" >> $GITHUB_OUTPUT - name: pull-request - uses: repo-sync/pull-request@v2 if: steps.main.outputs.abort == 0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - source_branch: ${{ env.UPDATE_BRANCH }} - destination_branch: ${{ steps.main.outputs.current_branch }} - pr_title: "Update from template" - pr_body: "An automated PR to sync changes from the template into this repo" - + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh_pr_up() { + gh pr create "$@" || gh pr edit "$@" + } + gh_pr_up -B "${{ steps.main.outputs.current_branch }}" \ + -H "${{ env.UPDATE_BRANCH }}" \ + --title "Update from template" \ + --body "An automated PR to sync changes from the template into this repo"