From cb3117ac1b0fa494025a35049aaf7bcbc7f1e955 Mon Sep 17 00:00:00 2001 From: Jakub Swierczek Date: Fri, 12 Apr 2024 09:25:42 +0200 Subject: [PATCH] Update merge process in GitHub workflow 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. --- .github/workflows/merge-main.yaml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/merge-main.yaml b/.github/workflows/merge-main.yaml index 1dec436fde..673da8c504 100644 --- a/.github/workflows/merge-main.yaml +++ b/.github/workflows/merge-main.yaml @@ -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"