forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 10
38 lines (30 loc) · 933 Bytes
/
Copy pathsync_branches.yml
File metadata and controls
38 lines (30 loc) · 933 Bytes
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
name: Sync Commits to Stable Branch
on:
push:
branches:
- hdmi_frl
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Sync Commits
run: |
COMMITS=$(git log master..${{ github.ref_name }} --pretty=format:"%H" | tac)
if [ -z "$COMMITS" ]; then
echo "No new commits to sync."
exit 0
fi
git checkout hdmi_frl_stable
for commit in $COMMITS; do
echo "Cherry-picking $commit"
git cherry-pick $commit || (git cherry-pick --abort && echo "Conflict skipped" && exit 1)
done
git push origin hdmi_frl_stable