2023-08-18 08:12:49 -04:00
|
|
|
name: backport
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request_target:
|
|
|
|
types:
|
|
|
|
- closed
|
|
|
|
- labeled
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
backport:
|
|
|
|
runs-on: docker
|
|
|
|
container:
|
|
|
|
image: node:20-bookworm
|
|
|
|
# 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')
|
|
|
|
)
|
|
|
|
)
|
|
|
|
steps:
|
|
|
|
- name: send backport if the label "backport {branch}" is present
|
2023-08-18 16:40:26 -04:00
|
|
|
if: secrets.WEBSITETOKEN != ''
|
2023-08-18 08:12:49 -04:00
|
|
|
uses: https://github.com/tibdex/backport@v2
|
|
|
|
with:
|
2023-08-18 08:50:44 -04:00
|
|
|
github_token: ${{ secrets.WEBSITETOKEN }}
|