Prevent merging unresolved conflicts

This commit is contained in:
Vincent 2023-05-24 12:11:21 +02:00 коммит произвёл Vincent
Родитель 2dcd4fa8e2
Коммит 326a24c225
1 изменённых файлов: 17 добавлений и 0 удалений

17
.github/workflows/conflicts.yml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,17 @@
name: No unresolved conflicts
on:
push:
branches: [ main ]
pull_request:
branches: [ main, localization ]
jobs:
detect-unresolved-conflicts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: List files with merge conflict markers
run: git --no-pager grep "<<<<<<<" ":(exclude).github/" || true
- name: Fail or succeed job if any files with merge conflict markers have been checked in
# Find lines containing "<<<<<<<", then count the number of lines.
# 0 matching lines results in exit code 0, i.e. success.
run: exit $(git grep "<<<<<<<" ":(exclude).github/" | wc --lines)