-
Notifications
You must be signed in to change notification settings - Fork 21
65 lines (61 loc) · 1.86 KB
/
Copy pathmain.yml
File metadata and controls
65 lines (61 loc) · 1.86 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Create a pull request to other versions
on:
pull_request:
branches:
- devel
- UE5.2
- UE5.3
- UE5.4
- UE5.4.4
- UE5.5
types: ["closed"]
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
create_pr:
runs-on: ubuntu-latest
name: create_pr to other branchs
if: github.event.pull_request.merged == true
strategy:
matrix:
version:
- devel
- UE5.2
- UE5.3
- UE5.4
- UE5.4.4
- UE5.5
steps:
- name: Check token permissions
run: |
curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}
- name: Checkout
uses: actions/checkout@v4
if: matrix.version != github.base_ref
with:
ref: ${{ matrix.version }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Debug
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo ${{ matrix.version }}, ${{ github.base_ref }}, $GITHUB_SHA. ${{ github.event.pull_request.user.login }}
- name: Cherry pick and create PR
if: matrix.version != github.base_ref
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: carloscastrojumo/github-cherry-pick-action@v1.0.9
with:
branch: ${{ matrix.version }}
labels: |
cherry-pick
reviewers: |
${{ github.event.pull_request.user.login }}
token: ${{ secrets.GITHUB_TOKEN }}
cherry-pick-branch: auto_created_${{ matrix.version }}_${{ github.sha }}
title: '[cherry-pick to ${{ matrix.version }} from ${{ github.base_ref }}] ${{ github.event.pull_request.title }}'
body: 'Cherry picking ${{ github.event.pull_request.title }} onto this branch'