2020-09-09 20:59:15 +08:00
|
|
|
name: Backport
|
|
|
|
on:
|
|
|
|
pull_request_target:
|
|
|
|
types:
|
|
|
|
- closed
|
|
|
|
- labeled
|
2021-02-15 05:35:13 +08:00
|
|
|
branches:
|
2021-05-31 17:49:49 +08:00
|
|
|
- main
|
2020-09-09 20:59:15 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
backport:
|
|
|
|
name: Backport
|
2023-04-14 20:48:08 +08:00
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
# Only react to merged PRs for security reasons.
|
|
|
|
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
|
|
|
|
if: >
|
|
|
|
github.event.pull_request.merged &&
|
|
|
|
(
|
|
|
|
github.event.action == 'closed' ||
|
|
|
|
(
|
|
|
|
github.event.action == 'labeled' &&
|
|
|
|
contains(github.event.label.name, 'backport')
|
|
|
|
)
|
|
|
|
)
|
2020-09-09 20:59:15 +08:00
|
|
|
steps:
|
|
|
|
- name: Backport
|
2023-04-14 20:48:08 +08:00
|
|
|
uses: zephyrproject-rtos/action-backport@v2.0.3-3
|
2020-09-09 20:59:15 +08:00
|
|
|
with:
|
2021-02-15 07:35:43 +08:00
|
|
|
github_token: ${{ secrets.ZB_GITHUB_TOKEN }}
|
2023-04-14 20:48:08 +08:00
|
|
|
issue_labels: Backport
|
|
|
|
labels_template: '["Backport"]'
|