aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/backport-based-on-label
blob: 1a188f9051d02ea877aff97af906df0f78a53b4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
name: Backport merged pull request (multiple commits possible)
on:
  pull_request_target:
    types: [closed]
permissions:
  contents: write
  pull-requests: write
jobs:
  backport:
    name: Backport pull request
    runs-on: ubuntu-22.04
    # Only run when pull request is merged and labeled 'backport'
    if: (github.event.pull_request.merged == true ) &&
      (contains(github.event.pull_request.labels.*.name, 'backport'))
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Create backport pull requests
        uses: korthout/backport-action@v1.3.1
        with:
          target_branches: kirkstone-next scarthgap-next
          # copy all labels (backport labels are automatically skipped)
          copy_labels_pattern: .+
          github_token: ${{ secrets.BOT_CREDENTIAL }}