Skip to content

model updated to gemini-2.0-flash #14

model updated to gemini-2.0-flash

model updated to gemini-2.0-flash #14

Workflow file for this run

name: Auto Merge Develop to Main
on:
push:
branches:
- Develop # Trigger action on push to Develop
jobs:
merge:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get last commit message on Develop
id: last_commit
run: |
LAST_COMMIT_MSG=$(git log -1 --pretty=%B)
echo "Last commit message: $LAST_COMMIT_MSG"
echo "::set-output name=commit_message::$LAST_COMMIT_MSG"
- name: Set up Git
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
- name: Checkout main branch
run: |
git fetch origin main
git checkout main
- name: Merge Develop into main (if commit message matches)
run: |
# Convert commit message to lowercase for case-insensitive comparison
COMMIT_MSG_LOWER=$(echo "${{ steps.last_commit.outputs.commit_message }}" | tr '[:upper:]' '[:lower:]')
if [[ "$COMMIT_MSG_LOWER" == *"ready to deploy"* ]]; then
echo "Commit message matches, merging Develop into main."
git merge origin/Develop --no-ff --allow-unrelated-histories -m "Merge Develop into main"
# Attempt the merge and capture the result
git merge origin/Develop --no-ff -m "Merge Develop into main" || { echo "Merge conflicts detected, skipping push."; exit 1; }
git push origin main
else
echo "Commit message does not match, skipping merge."
fi