From 2c7500a1586383b8617d285369073790b6bc4ed6 Mon Sep 17 00:00:00 2001 From: Paul Meyer <49727155+katexochen@users.noreply.github.com> Date: Fri, 9 Feb 2024 14:14:09 +0100 Subject: [PATCH] switch action Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> --- .github/workflows/backport.yml | 37 +++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index aa083ea15..a71bf11ba 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -2,29 +2,34 @@ name: backport pr on: pull_request: - types: [labeled, closed] + types: [closed] + issue_comment: + types: [created] jobs: backport: if: | - github.repository_owner == 'edgelesssys' && - github.event.pull_request.merged == true && - (github.event_name != 'labeled' || startsWith('backport', github.event.label.name)) + ( + github.event_name == 'pull_request' && + github.event.pull_request.merged + ) || ( + github.event_name == 'issue_comment' && + github.event.issue.pull_request && + startsWith(github.event.comment.body, '/backport') + ) runs-on: ubuntu-22.04 permissions: contents: write pull-requests: write steps: - - name: Backport Action - uses: sorenlouv/backport-github-action@f7073a2287aefc1fa12685eb25a712ab5620445c # v9.3.1 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Create backport PRs + uses: korthout/backport-action@e8161d6a0dbfa2651b7daa76cbb75bc7c925bbf3 # v2.4.1 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - auto_backport_label_prefix: "backport to " - - name: Info log - if: success() - run: | - cat ~/.backport/backport.info.log - - name: Debug log - if: failure() - run: | - cat ~/.backport/backport.debug.log + copy_milestone: true + pull_title: '[${target_branch}] ${pull_title}' + github_token: ${{ secrets.NUNKI_CI_COMMIT_PUSH_PR }} + experimental: | + { + "detect_merge_method": true + }