From f93c31d7172142f027b00631a26f6d08dc35145d Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Sun, 14 Jun 2026 01:24:15 -0300 Subject: [PATCH] backport: Modernise the backport workflow The workflow used the deprecated zeebe-io/backport-action@v0.0.4 and relied on the default GITHUB_TOKEN, which is read-only by default, so it could not actually create the backport branches and pull requests. Switch to the maintained korthout/backport-action@v4, grant the required contents and pull-requests write permissions, and bump actions/checkout to v4. Trigger on both 'closed' and 'labeled' so a 'backport ' label backports automatically on merge whether it was added before or after merging, with no manual /backport comment. Signed-off-by: Otavio Salvador --- .github/workflows/backport.yaml | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/.github/workflows/backport.yaml b/.github/workflows/backport.yaml index cf31777..6faabda 100644 --- a/.github/workflows/backport.yaml +++ b/.github/workflows/backport.yaml @@ -1,28 +1,21 @@ -name: Backport labeled merged pull requests +name: Backport merged pull requests on: pull_request_target: - types: [closed] + types: [closed, labeled] + +permissions: + contents: write + pull-requests: write + jobs: - build: + backport: name: Create backport PRs runs-on: ubuntu-latest - # Only run when pull request is merged - # or when a comment containing `/backport` is created + # Run on merged PRs that carry a 'backport ' label, whether the + # label was added before the merge or afterwards. if: github.event.pull_request.merged steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: - # Required to find all branches fetch-depth: 0 - - name: Create backport PRs - # Should be kept in sync with `version` - uses: zeebe-io/backport-action@v0.0.4 - with: - # Required - # Version of the backport-action - # Must equal the version in `uses` - # Recommended: latest tag or `master` - version: v0.0.4 - - github_token: ${{ secrets.GITHUB_TOKEN }} - github_workspace: ${{ github.workspace }} + - uses: korthout/backport-action@v4