1
+ # # ---------------------------------------------------------------------------
2
+ # # See the NOTICE file distributed with this work for additional
3
+ # # information regarding copyright ownership.
4
+ # #
5
+ # # This is free software; you can redistribute it and/or modify it
6
+ # # under the terms of the GNU Lesser General Public License as
7
+ # # published by the Free Software Foundation; either version 2.1 of
8
+ # # the License, or (at your option) any later version.
9
+ # #
10
+ # # This software is distributed in the hope that it will be useful,
11
+ # # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # # Lesser General Public License for more details.
14
+ # #
15
+ # # You should have received a copy of the GNU Lesser General Public
16
+ # # License along with this software; if not, write to the Free
17
+ # # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18
+ # # 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19
+ # # ---------------------------------------------------------------------------
20
+ # # Automatically backport merged pull requests that are labelled with a label containing "backport"
21
+ # # using https://github.com/tibdex/backport.
22
+ name : Backport
23
+ on :
24
+ pull_request_target :
25
+ types :
26
+ - closed
27
+ - labeled
28
+
29
+ jobs :
30
+ backport :
31
+ name : Backport
32
+ runs-on : ubuntu-latest
33
+ # Only react to merged PRs for security reasons.
34
+ # See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
35
+ if : >
36
+ github.event.pull_request.merged
37
+ && (
38
+ github.event.action == 'closed'
39
+ || (
40
+ github.event.action == 'labeled'
41
+ && contains(github.event.label.name, 'backport')
42
+ )
43
+ )
44
+ steps :
45
+ - uses : tibdex/backport@v2
46
+ with :
47
+ github_token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments