-
Notifications
You must be signed in to change notification settings - Fork 19
40 lines (35 loc) · 1.03 KB
/
backport-5.5.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
37
38
39
40
name: Backport changes to version 5.5
on:
push:
branches:
- main
jobs:
backport:
strategy:
matrix:
branch: ['5.5.0']
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Check PR for backport label
id: check_pr_labels
uses: shioyang/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
labels: '["backport to 5.5"]'
- name: See result
run: echo "${{ steps.check_pr_labels.outputs.result }}"
- name: Checkout maintenance branch and cherry-pick
if: ${{ steps.check_pr_labels.outputs.result == 'true' }}
run: |
git fetch
git checkout ${{ matrix.branch }}
git cherry-pick -x --strategy=recursive -X theirs $GITHUB_SHA
git push