Created
August 17, 2023 18:29
-
-
Save JudahSan/077631c3dcbd6de0e5beb38f84c14389 to your computer and use it in GitHub Desktop.
Git actions yaml files
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: Merge dev to stage | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| jobs: | |
| merge: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout dev branch | |
| uses: actions/checkout@v2 | |
| with: | |
| ref: dev | |
| - name: Git pull | |
| run: | | |
| git pull | |
| - name: Checkout stage branch | |
| run: | | |
| git checkout -b stage | |
| - name: Merge dev into stage | |
| run: | | |
| git merge dev | |
| - name: Push stage branch | |
| run: | | |
| git push origin stage |
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: Merge stage to main | |
| on: | |
| push: | |
| branches: | |
| - stage | |
| jobs: | |
| merge: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout stage branch | |
| uses: actions/checkout@v2 | |
| with: | |
| ref: stage | |
| - name: Merge stage into main | |
| run: | | |
| git checkout main | |
| git merge stage | |
| - name: Push main branch | |
| run: | | |
| git push origin main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment