Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix failing automerge job (HOM-132) #54

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,31 @@ jobs:
runs-on: ubuntu-latest

steps:
# Step 1: Checkout the repository
# Step 1: Checkout the repository with all history
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch full history to avoid merge conflicts

# Step 2: Configure Git (to authorize the merge commit)
# Step 2: Set up Git to authorize the merge commit
- name: Set up Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

# Step 3: Fetch all branches and history
# Step 3: Fetch all branches
- name: Fetch All Branches
run: git fetch --all
run: git fetch origin +refs/heads/*:refs/remotes/origin/*

# Step 4: Merge develop into staging
# Step 4: Check out the staging branch
- name: Check out Staging Branch
run: git checkout origin/staging -B staging # Ensure correct tracking

# Step 5: Merge develop into staging
- name: Merge Develop into Staging
run: |
git checkout staging
git merge develop --no-ff --commit -m "Auto-merged develop into staging"
git merge origin/develop --no-ff --commit -m "Auto-merged develop into staging"

# Step 5: Push the changes to the staging branch
# Step 6: Push the merged changes to the staging branch
- name: Push to Staging
run: |
git push origin staging
run: git push origin staging
Loading