diff --git a/.github/workflows/repository-safety-check.yml b/.github/workflows/repository-safety-check.yml new file mode 100644 index 0000000..8d14cf7 --- /dev/null +++ b/.github/workflows/repository-safety-check.yml @@ -0,0 +1,34 @@ +name: Repository safety checks + +on: + pull_request: + branches: + - master + push: + branches: + - master + +permissions: + contents: read + +jobs: + repo-safety-check: + name: repo-safety-check + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Check README exists + run: test -f README.md + + - name: Check for unresolved merge conflict markers + run: | + if grep -R -n -E '^(<<<<<<<|=======|>>>>>>>)' . --exclude-dir=.git; then + echo "Unresolved merge conflict marker found." + exit 1 + fi + echo "No merge conflict markers found."