User/test merge (#4) #3
This file contains hidden or 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
| name: Auto Merge Hotfix into Develop | |
| on: | |
| push: | |
| branches: | |
| - main # Trigger this action when code is pushed to 'main' | |
| jobs: | |
| merge_hotfix_to_develop: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout the repository | |
| - name: Checkout Repository | |
| uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| # Set up Git | |
| - name: Set up Git | |
| run: | | |
| git config user.name "GitHub Actions" | |
| git config user.email "[email protected]" | |
| # Merge the hotfix into develop | |
| - name: Merge Hotfix into Develop | |
| run: | | |
| git checkout develop | |
| git pull origin develop | |
| git merge main --no-ff --commit -m "Merge hotfix from main into develop" | |
| git push origin develop |