Skip to content

Commit

Permalink
Update merge process in GitHub workflow (#164)
Browse files Browse the repository at this point in the history
The merge operation from 'dev' to 'main' has been refactored to use the
'merge-fast-forward-action'. This change simplifies the GitHub workflow
by replacing the manual git commands with a dedicated action. In
addition, custom success and failure messages have been provided for
better visibility of merge status.
  • Loading branch information
jakubswierczek committed Apr 12, 2024
1 parent cad97f2 commit ed61cd6
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/merge-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,11 @@ jobs:
git config user.name ${{ github.actor }}
- name: Merge dev -> main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
run: |
git status
git fetch
git checkout dev
git pull
git checkout main
git rebase dev
git push origin main
git status
uses: pascalgn/merge-fast-forward-action@v1.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SUCCESS_MESSAGE: "Release merged successfully via fast-forward"
FAILURE_MESSAGE: "Failed to merge release via fast-forward"
UPDATE_STATUS: "true"
PRODUCTION_BRANCH: "main"
STAGING_BRANCH: "dev"

0 comments on commit ed61cd6

Please sign in to comment.