-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
955 additions
and
295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Sync 02 branches | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
- stage | ||
- main | ||
|
||
jobs: | ||
sync-dev02: | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/dev' | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Git | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
- name: Fetch all branches | ||
run: git fetch --all | ||
|
||
- name: Check out dev02 branch | ||
run: git checkout dev02 | ||
|
||
- name: Merge dev into dev02 with theirs strategy | ||
run: git merge origin/dev --strategy-option theirs --allow-unrelated-histories | ||
|
||
- name: Push changes to dev02 | ||
run: git push origin dev02 | ||
|
||
sync-stage02: | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/stage' | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Git | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
- name: Fetch all branches | ||
run: git fetch --all | ||
|
||
- name: Check out stage02 branch | ||
run: git checkout stage02 | ||
|
||
- name: Merge stage into stage02 with theirs strategy | ||
run: git merge origin/stage --strategy-option theirs --allow-unrelated-histories | ||
|
||
- name: Push changes to stage02 | ||
run: git push origin stage02 | ||
|
||
sync-main02: | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Git | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
- name: Fetch all branches | ||
run: git fetch --all | ||
|
||
- name: Check out main02 branch | ||
run: git checkout main02 | ||
|
||
- name: Merge main into main02 with theirs strategy | ||
run: git merge origin/main --strategy-option theirs --allow-unrelated-histories | ||
|
||
- name: Push changes to main02 | ||
run: git push origin main02 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.