This is an automated email from the ASF dual-hosted git repository.

jgemignani pushed a commit to branch new-web
in repository https://gitbox.apache.org/repos/asf/age-website.git


The following commit(s) were added to refs/heads/new-web by this push:
     new cf8f4597 Update merge conflict workflow (#293)
cf8f4597 is described below

commit cf8f4597f9ad892c7513933a62badb55f1a9b845
Author: Muhammad Taha Naveed <[email protected]>
AuthorDate: Fri Apr 5 01:58:56 2024 +0500

    Update merge conflict workflow (#293)
    
    - Removed the previous action as it was not
      allowed to be used in apache repos.
---
 .github/workflows/merge-conflict.yml | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/merge-conflict.yml 
b/.github/workflows/merge-conflict.yml
index c1f18b1b..cf549780 100644
--- a/.github/workflows/merge-conflict.yml
+++ b/.github/workflows/merge-conflict.yml
@@ -5,10 +5,17 @@ on: pull_request
 jobs:
   merge_conflict_job:
     runs-on: ubuntu-latest
-    name: Find merge conflicts
     steps:
-      # Checkout the source code so there are some files to look at.
       - uses: actions/checkout@v3
-      # Run the actual merge conflict finder
-      - name: Merge Conflict finder
-        uses: olivernybroe/[email protected]
\ No newline at end of file
+      - name: Check for merge conflicts
+        run: |
+          # Find files with merge conflict markers
+          conflicted_files=$(git grep --quiet -e "<<<<<<<" -e ">>>>>>>" 
":(exclude).github/" && echo "true" || echo "false")
+          # If there are conflicts, print the filenames
+          if [ "$conflicted_files" = "true" ]; then
+            echo "Unresolved merge conflicts found in the following files:"
+            git grep -e "<<<<<<<" -e ">>>>>>>" ":(exclude).github/"
+            exit 1
+          else
+            echo "No unresolved merge conflicts found."
+          fi
\ No newline at end of file

Reply via email to