-
-
Notifications
You must be signed in to change notification settings - Fork 230
36 lines (33 loc) · 977 Bytes
/
backport.yml
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
26
27
28
29
30
31
32
33
34
35
36
# Copyright 2023 René Ferdinand Rivera Morell
# Use, modification, and distribution are subject to the
# Boost Software License, Version 1.0. (See accompanying file LICENSE.txt)
name: "Backports"
on:
pull_request_target:
types: [closed]
branches: ["main"]
issue_comment:
types: [created]
branches: ["main"]
permissions:
contents: write # so it can comment
pull-requests: write # so it can create pull requests
jobs:
backport:
runs-on: ubuntu-latest
name: "Backport"
if: >
(
github.event_name == 'pull_request' &&
github.event.pull_request.merged
) || (
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
github.event.comment.user.id != 97796249 &&
contains(github.event.comment.body, '/backport')
)
steps:
- name: "Checkout"
uses: actions/checkout@master
- name: "Backport PR"
uses: korthout/backport-action@main