File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 1- name : Auto-Update Dev Branch from Master
1+ name : Auto-Update Dev Branches from Master
22
33on :
44 push :
55 branches :
66 - master # Trigger workflow on commits to 'dev' branch
77
88jobs :
9- update-main :
9+ update-dev :
10+ strategy :
11+ matrix :
12+ branch : [ "dev", "docs" ]
1013 runs-on : ubuntu-latest
14+
1115 permissions :
1216 contents : write # Required to push to protected branches
1317
1418 steps :
1519 - name : Checkout Main Branch
1620 uses : actions/checkout@v4
1721 with :
18- ref : dev
22+ ref : ${{ matrix.branch }}
1923 fetch-depth : 0
2024 ssh-key : ${{ secrets.DEPLOY_KEY }}
2125
@@ -24,11 +28,12 @@ jobs:
2428 git config user.name "github-actions"
2529 git config user.email "[email protected] " 2630
27- - name : Merge auto-update into dev
31+ - name : Merge auto-update into ${{ matrix.branch }}
2832 run : |
2933 git fetch origin master:master
3034 git merge --no-ff master -m "Auto-merge updates from master branch"
3135
32- - name : Push Changes to Main
36+ - name : Push Changes to ${{ matrix.branch }}
3337 run : |
34- git push origin dev
38+ git push origin ${{ matrix.branch }}
39+
You can’t perform that action at this time.
0 commit comments