From eb03341689459b1ad41a51412fc66f6a18a0fc09 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Mon, 14 Oct 2024 19:21:04 +0200 Subject: [PATCH] ci(actions): Add `sync_branches` workflow --- .github/workflows/sync_branches.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/sync_branches.yml diff --git a/.github/workflows/sync_branches.yml b/.github/workflows/sync_branches.yml new file mode 100644 index 0000000..0db253a --- /dev/null +++ b/.github/workflows/sync_branches.yml @@ -0,0 +1,28 @@ +name: Sync Branches +on: + push: + - "2.4" + - "2.5" + +jobs: + sync-branches: + strategy: + matrix: + include: + - from_branch: 2.4 + to_branch: 2.5 + - from_branch: 2.5 + to_branch: main + runs-on: ubuntu-latest + if: ${{ github.ref_name == matrix.to_branch }} + steps: + - name: Merge ${{ matrix.from_branch }} into ${{ matrix.to_branch }} + uses: tretuna/sync-branches@1.4.0 + with: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + FROM_BRANCH: ${{ matrix.from_branch }} + TO_BRANCH: ${{ matrix.from_branch }} + CONTENT_COMPARISON: true # Prevent empty PRs + PULL_REQUEST_TITLE: Merge changes from `${{ matrix.from_branch }}` into `${{ matrix.to_branch }}` + PULL_REQUEST_BODY: | + New content has landed in the `${{ matrix.from_branch }}` branch, so let's merge the changes into `${{ matrix.to_branch }}`.