File tree 1 file changed +38
-0
lines changed
1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Rebase release-dev/* onto main
2
+
3
+ on :
4
+ schedule :
5
+ - cron : " 0 20 * * *" # 8pm UTC daily, 1pm EST daily
6
+ workflow_dispatch : # Allow manual trigger
7
+
8
+ jobs :
9
+ rebase-release-dev :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Checkout
13
+ uses : actions/checkout@v4
14
+ with :
15
+ fetch-depth : 0
16
+ token : ${{ secrets.GITHUB_TOKEN }}
17
+
18
+ - name : Setup Git
19
+ run : |
20
+ git config user.name "GitHub Actions"
21
+ git config user.email "[email protected] "
22
+
23
+ - name : Fetch all branches
24
+ run : git fetch origin "+refs/heads/*:refs/remotes/origin/*"
25
+
26
+ - name : Rebase each release-dev/* branch onto main
27
+ run : |
28
+ for branch in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin/release-dev/*); do
29
+ echo "Processing $branch"
30
+ bname=$(basename $branch)
31
+ git checkout -B $bname $branch
32
+ git rebase origin/main || {
33
+ echo "Rebase failed for $bname. Skipping push."
34
+ continue
35
+ }
36
+ git push origin $bname
37
+ done
38
+
You can’t perform that action at this time.
0 commit comments