How to check if a Pull Request has merge conflicts in Github Actions

Viewed 428

I want to be able to determine if a Pull Request has merge conflicts in a GitHub Action's pipeline, and if they do run echo this PR has merge conflicts.

1 Answers

You could try the olivernybroe/action-conflict-finder, as example:

on: [push]

jobs:
  merge_conflict_job:
    runs-on: ubuntu-latest
    name: Find merge conflicts
    steps:
      # Checkout the source code so we have some files to look at.
      - uses: actions/checkout@v2
      # Run the actual merge conflict finder
      - name: Merge Conflict finder
        uses: olivernybroe/action-conflict-finder@v2.0
Related