File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Sync Commits to Stable Branch
2+
3+ on :
4+ push :
5+ branches :
6+ - hdmi_frl
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ sync :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout Code
16+ uses : actions/checkout@v4
17+ with :
18+ fetch-depth : 0
19+
20+ - name : Configure Git
21+ run : |
22+ git config user.name "github-actions[bot]"
23+ git config user.email "github-actions[bot]@users.noreply.github.com"
24+
25+ - name : Sync Commits
26+ run : |
27+ COMMITS=$(git log origin/master..origin/${{ github.ref_name }} --pretty=format:"%H" | tac)
28+
29+ if [ -z "$COMMITS" ]; then
30+ echo "No new commits to sync."
31+ exit 0
32+ fi
33+
34+ git checkout hdmi_frl_stable
35+
36+ for commit in $COMMITS; do
37+ echo "Cherry-picking $commit"
38+ git cherry-pick $commit || (git cherry-pick --abort && echo "Conflict skipped" && exit 1)
39+ done
40+
41+ git push origin hdmi_frl_stable
You can’t perform that action at this time.
0 commit comments