2023-11-12 13:40:24 -07:00
|
|
|
name: backport
|
2021-10-26 08:45:15 -07:00
|
|
|
on:
|
|
|
|
pull_request_target:
|
|
|
|
types: [closed, labeled]
|
|
|
|
jobs:
|
|
|
|
backport:
|
2021-10-30 13:27:54 -07:00
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
pull-requests: write
|
2021-10-26 08:45:15 -07:00
|
|
|
name: Backport Pull Request
|
2023-04-08 04:14:13 -07:00
|
|
|
if: github.event.pull_request.merged
|
2021-10-26 08:45:15 -07:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-04 05:51:40 -07:00
|
|
|
- uses: actions/checkout@v4
|
2024-05-01 06:39:46 -07:00
|
|
|
- name: Create backport PR
|
|
|
|
id: backport
|
2024-05-27 09:42:45 -07:00
|
|
|
uses: korthout/backport-action@v3
|
2024-01-01 06:35:35 -07:00
|
|
|
with:
|
2024-05-01 06:39:46 -07:00
|
|
|
pull_title: "${pull_title}"
|
|
|
|
label_pattern: "^ci:backport ([^ ]+)$"
|
|
|
|
|
2024-05-01 15:58:07 -07:00
|
|
|
- if: ${{steps.backport.outputs.was_successful == 'true'}}
|
|
|
|
uses: actions/github-script@v7
|
2024-05-01 06:39:46 -07:00
|
|
|
with:
|
|
|
|
script: |
|
|
|
|
github.rest.issues.addLabels({
|
|
|
|
issue_number: ${{steps.backport.outputs.created_pull_numbers}},
|
|
|
|
owner: context.repo.owner,
|
|
|
|
repo: context.repo.repo,
|
2024-05-17 13:35:46 -07:00
|
|
|
labels: ['target:release']
|
2024-05-01 06:39:46 -07:00
|
|
|
})
|