Skip to content

Merge pull request #106 from sonomirco/dev/mibi/last-test #76

Merge pull request #106 from sonomirco/dev/mibi/last-test

Merge pull request #106 from sonomirco/dev/mibi/last-test #76

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