From adfcfb4bb7a5a423b9765cdf38c6861178bb96e7 Mon Sep 17 00:00:00 2001 From: tasso94 <3015690+tasso94@users.noreply.github.com> Date: Wed, 20 Dec 2023 11:19:44 +0100 Subject: [PATCH] chore(workflows): adjust backport.yml --- .github/workflows/backport.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 4beb61f..a3a9171 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -20,8 +20,17 @@ jobs: backport: name: Backport pull request runs-on: ubuntu-latest - # Don't run on closed unmerged pull requests - if: github.event.pull_request.merged + # Only run when pull request is merged + # or when a comment containing `/backport` is created + if: > + ( + github.event_name == 'pull_request' && + github.event.pull_request.merged + ) || ( + github.event_name == 'issue_comment' && + github.event.issue.pull_request && + contains(github.event.comment.body, '/backport') + ) steps: - name: Import Secrets id: secrets @@ -55,3 +64,4 @@ jobs: copy_assignees: true copy_requested_reviewers: true label_pattern: ^backport:([^ ]+)$ + copy_labels_pattern: ^ci:([^ ]+)$