Merge Dev into Main #3
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
name: Merge Dev into Main | |
on: | |
workflow_dispatch: | |
jobs: | |
merge-dev-into-main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Fetch Development Branch | |
run: git fetch origin development | |
- name: Set up Java | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '22.0.2' | |
distribution: 'temurin' | |
- name: Install Dependencies | |
run: ./gradlew dependencies | |
- name: Run Tests | |
run: ./gradlew test | |
- name: Merge Development branch into Main | |
if: success() | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git checkout main | |
git pull origin main | |
git merge --no-ff development -m "GitHub Action: Merge development branch into main" | |
git push origin main |