File tree Expand file tree Collapse file tree 2 files changed +73
-7
lines changed Expand file tree Collapse file tree 2 files changed +73
-7
lines changed Original file line number Diff line number Diff line change
1
+ name : Sync workspace
2
+
3
+ inputs :
4
+ base_branch :
5
+ description : Base branch
6
+ required : true
7
+ default : qcom-next-staging
8
+ pr_url :
9
+ description : PR url
10
+ required : false
11
+ pr_number :
12
+ description : PR number
13
+ required : false
14
+
15
+ runs :
16
+ using : " composite"
17
+ steps :
18
+ - name : Checkout PR branch
19
+ if : ${{ inputs.base_branch }} == 'qcom-next-staging'
20
+ uses : actions/checkout@v4
21
+ shell : bash
22
+ with :
23
+ fetch-depth : 0
24
+
25
+ - name : Configure git
26
+ shell : bash
27
+ run : |
28
+ git config --global user.name "github-actions"
29
+ git config --global user.email "github-actions@github.com"
30
+
31
+ - name : Sync with latest changes
32
+ if : ${{ inputs.base_branch }} == 'qcom-next-staging'
33
+ shell : bash
34
+ run : |
35
+ echo "Syncing with latest changes..."
36
+ git fetch origin ${{ inputs.base_branch }}
37
+ git merge origin/${{ inputs.base_branch }}
38
+
39
+ - name : Clone repositories
40
+ if : ${{ inputs.base_branch }} != 'qcom-next-staging'
41
+ shell : bash
42
+ run : |
43
+ git clone https://github.com/qualcomm-linux/kernel.git
44
+ git clone https://github.com/qualcomm-linux/automerge.git
45
+
46
+ - name : Create merge configuration
47
+ if : ${{ inputs.base_branch }} != 'qcom-next-staging'
48
+ shell : bash
49
+ run : |
50
+ TOPIC_BRANCH=${{ inputs.base_branch }}
51
+ cat <<EOF > merge.conf
52
+ baseline git@github.com:qualcomm-linux/kernel.git qcom-next
53
+ topic git@github.com:qualcomm-linux/kernel-topics.git $TOPIC_BRANCH
54
+ pr ${{ inputs.pr_url }} pull/${{ inputs.pr_number }}/head
55
+ EOF
56
+ echo "File 'merge.conf' created successfully."
57
+
58
+ - name : Run auto merge
59
+ if : ${{ inputs.base_branch }} != 'qcom-next-staging'
60
+ shell : bash
61
+ run : |
62
+ cd kernel
63
+ ../automerge/ci-merge -f ../merge.conf -t head -n
Original file line number Diff line number Diff line change 18
18
required : false
19
19
type : string
20
20
default : qcom-next-staging
21
+ pr_url :
22
+ type : string
23
+ required : false
24
+ pr_number :
25
+ type : string
26
+ required : false
21
27
22
28
jobs :
23
29
checker :
@@ -36,14 +42,11 @@ jobs:
36
42
docker build . -t kmake-image
37
43
38
44
- name : Checkout code
39
- uses : actions/checkout@v4
45
+ uses : qualcomm-linux/kernel-checkers/.github/ actions/sync
40
46
with :
41
- fetch-depth : 0
42
-
43
- - name : Merge Base Branch
44
- run : |
45
- git fetch origin ${{ inputs.base_branch }}
46
- git merge origin/${{ inputs.base_branch }}
47
+ base_branch : ${{ inputs.base_branch }}
48
+ pr_url : ${{ inputs.pr_url }}
49
+ pr_number : ${{ inputs.pr_number }}
47
50
48
51
- name : Clone kernel-checkers
49
52
run : cd .. && git clone https://github.com/qualcomm-linux/kernel-checkers.git
You can’t perform that action at this time.
0 commit comments