Skip to content

Commit 9668b86

Browse files
authored
Update auto-update-dev.yml (#2096)
1 parent 2a41918 commit 9668b86

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed
Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
1-
name: Auto-Update Dev Branch from Master
1+
name: Auto-Update Dev Branches from Master
22

33
on:
44
push:
55
branches:
66
- master # Trigger workflow on commits to 'dev' branch
77

88
jobs:
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+

0 commit comments

Comments
 (0)