Testing CI workflow #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Comment on README edits | |
on: | |
pull_request_target: | |
types: [opened, edited] | |
jobs: | |
comment: | |
if: contains(github.event.pull_request.title, 'README.md') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Post comment if README.md is edited | |
run: | | |
if grep -q "README.md" <<< "$(git diff --name-only HEAD~1 HEAD)"; then | |
gh pr comment ${{ github.event.pull_request.number }} --body "Please edit the [`data_sources.json`](src/data_sources.json) file instead of the `README.md`, as the README is auto-generated. Thank you :pray:" | |
fi |