-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from scaedufax/automerge
Add workflow to automatically merge changes in stable into stardisk branch
- Loading branch information
Showing
1 changed file
with
50 additions
and
0 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,50 @@ | ||
# Automatically synchronises the stardisk branch with the stable branch | ||
# | ||
# In case of failure (merge conflict) the conflict needs to be resolved by | ||
# hand. For a detailed description see the git book: | ||
# git book: https://git-scm.com/book/en/v2 | ||
# merge conflicts basics: https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging | ||
# advanced merging: https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging | ||
# | ||
# The general outline goes as follows: | ||
# 1. Make sure the stable and stardisk branches are up to date, respectively | ||
# git checkout stable | ||
# git pull | ||
# git checkout stardisk | ||
# git pull | ||
# 2. Merge stable into stardisk (make sure you are on the stardisk branch first) | ||
# git checkout stardisk | ||
# git merge stable | ||
# 3. Merge conflicts should appear. Fix conflict in a way of your choice, e.g., | ||
# git mergetool --tool=vimdiff | ||
# 4. commit and push your changes to the upstream stardisk branch | ||
# git push origin stardisk | ||
|
||
name: Synchronise stardisk-dev with dev branch | ||
|
||
on: | ||
push: | ||
branches: [dev] | ||
|
||
jobs: | ||
sync: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup GitHub Action User | ||
run: | | ||
git config user.name "GitHub Action" | ||
git config user.email "<EMAIL>" | ||
|
||
- name: Update Stardisk Branch | ||
run: | | ||
git fetch origin | ||
git checkout stardisk-dev | ||
git pull | ||
git merge origin/dev | ||
git push origin stardisk-dev |