Create read_pr.yml #58
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: Validate PR Comment | |
on: | |
push: | |
issue_comment: | |
jobs: | |
validate: | |
#if: ${{ github.event.issue.pull_request }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJSON(github) }} | |
- run: | | |
echo "$GITHUB_CONTEXT" | |
echo ${{ github.event.issue.pull_request.headRefName }} | |
echo ${{ github.event.issue.pull_request.head.number }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.issue.pull_request.headRef }} | |
- name: 🐍 Setting Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
- run: | | |
python -m pip install --upgrade pip | |
pip install -r .github/requirements.txt | |
python .github/validate_comment.py --body ${{ github.event.comment.body }} | |
if [ $? -ne 0 ]; then | |
echo "Validation failed!" | |
exit 1 | |
fi |