17 строки
781 B
YAML
17 строки
781 B
YAML
name: No unresolved conflicts
|
|
on:
|
|
pull_request:
|
|
branches: [ main, localization ]
|
|
jobs:
|
|
detect-unresolved-conflicts:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: List files with merge conflict markers
|
|
# Encode conflict markers so this file does not trigger git's conflict detection.
|
|
run: git --no-pager grep "$(echo 'PDw8PDw8PAo=' | base64 -d)" ":(exclude).github/" || true
|
|
- name: Fail or succeed job if any files with merge conflict markers have been checked in
|
|
# Find lines containing conflict markers then count the number of lines.
|
|
# 0 matching lines results in exit code 0, i.e. success.
|
|
run: exit $(git grep "$(echo 'PDw8PDw8PAo=' | base64 -d)" ":(exclude).github/" | wc --lines)
|