File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Sync Master to Release Branch
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+
8+ jobs :
9+ sync_master_to_release :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Check out the repo
13+ uses : actions/checkout@v4
14+ with :
15+ fetch-depth : 0
16+
17+ - name : Configure Git
18+ run : |
19+ git config user.name "GitHub Actions Bot"
20+ git config user.email "[email protected] " 21+
22+ - name : Merge master into release
23+ run : |
24+ BRANCH_NAME="redhat-3.15"
25+ echo "Syncing master to $BRANCH_NAME"
26+ git checkout master
27+ git pull origin master
28+ MASTER_COMMIT=$(git rev-parse HEAD)
29+
30+ git fetch origin $BRANCH_NAME
31+ git checkout $BRANCH_NAME
32+ git pull origin $BRANCH_NAME
33+ RELEASE_COMMIT=$(git rev-parse HEAD)
34+ echo "Rebasing $BRANCH_NAME ($RELEASE_COMMIT) onto master ($MASTER_COMMIT)"
35+ git rebase master
36+ git push origin $BRANCH_NAME
37+
38+ echo "Merged master ($MASTER_COMMIT) into $BRANCH_NAME ($RELEASE_COMMIT)"
39+ env :
40+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments