blob: b571e7f598899d527625a53cea085acb2f6f79e4 (
plain) (
blame)
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
|
name: rightlib sync
description: Automatically sync rightlib branch into main
inputs:
base_branch:
required: true
description: "Branch to merge into"
head_branch:
required: true
description: "Branch to merge into base"
label:
required: true
description: "Label to mark your PR with"
repository:
required: true
description: "token for access GitHub"
merge_ours:
description: "File to resolve with --ours (base branch) upon merge conflict"
merge_theirs:
description: "File to resolve with --theirs (head branch) upon merge conflict"
gh_personal_access_token:
required: true
description: "token for access GitHub"
runs:
using: "composite"
steps:
- name: install packages
shell: bash
run: |
pip install PyGithub==2.5.0
- name: configure
shell: bash
run: |
git config --global user.name YDBot
git config --global user.email [email protected]
git config --local github.token ${{ inputs.gh_personal_access_token }}
- name: run-command
shell: bash
env:
REPO: ${{ inputs.repository }}
TOKEN: ${{ inputs.gh_personal_access_token }}
run: |
cd ./ydb/ci/rightlib
MERGE_ARGS=''
if [ -n "${{ inputs.merge_ours }}" ]; then
MERGE_ARGS+="--merge-ours ${{ inputs.merge_ours }}"
fi
if [ -n "${{ inputs.merge_theirs }}" ]; then
MERGE_ARGS+=" --merge-theirs ${{ inputs.merge_theirs }}"
fi
echo $MERGE_ARGS
./create_sync_pr.py --base-branch="${{ inputs.base_branch }}" --head-branch="${{ inputs.head_branch }}" --process-label="${{ inputs.label }}" $MERGE_ARGS
|