Skip to content

Commit

Permalink
ci: trigger cherry-pick/backport by labels on PR (#499) (#500)
Browse files Browse the repository at this point in the history
Signed-off-by: Lin Yang <[email protected]>
(cherry picked from commit 77f6c3b)
  • Loading branch information
reaver-flomesh authored Dec 3, 2024
1 parent cd9ec8a commit 2e0036b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
backport_v1_4:
runs-on: ubuntu-latest
name: Backport into release/v1.4
if: ${{ !startsWith(github.event.pull_request.title, '[cherry-pick]') && github.repository == 'flomesh-io/fsm' && github.event.pull_request.merged == true }}
if: ${{ contains(github.event.pull_request.labels.*.name, 'needs-backport') && github.repository == 'flomesh-io/fsm' && github.event.pull_request.merged == true }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -23,7 +23,7 @@ jobs:
uses: korthout/backport-action@v3
with:
copy_assignees: true
copy_labels_pattern: '[\s\S]+'
copy_labels_pattern: '^(?!needs-).*'
copy_requested_reviewers: true
github_token: ${{ secrets.WORKFLOW_PAT }}
pull_title: '[backport] ${pull_title}'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cherry-pick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
cherry_pick_main:
runs-on: ubuntu-latest
name: Cherry pick into main
if: ${{ !startsWith(github.event.pull_request.title, '[backport]') && github.repository == 'flomesh-io/fsm' && github.event.pull_request.merged == true }}
if: ${{ contains(github.event.pull_request.labels.*.name, 'needs-cherry-pick') && github.repository == 'flomesh-io/fsm' && github.event.pull_request.merged == true }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -23,7 +23,7 @@ jobs:
uses: korthout/backport-action@v3
with:
copy_assignees: true
copy_labels_pattern: '[\s\S]+'
copy_labels_pattern: '^(?!needs-).*'
copy_requested_reviewers: true
github_token: ${{ secrets.WORKFLOW_PAT }}
pull_title: '[cherry-pick] ${pull_title}'
Expand Down

0 comments on commit 2e0036b

Please sign in to comment.