mirror of
https://github.com/PlaneQuery/OpenAirframes.git
synced 2026-04-24 12:06:31 +02:00
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: Validate Community Submission
|
|
|
|
on:
|
|
issues:
|
|
types: [opened, edited]
|
|
|
|
permissions:
|
|
issues: write
|
|
|
|
jobs:
|
|
validate:
|
|
if: contains(github.event.issue.labels.*.name, 'submission')
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install dependencies
|
|
run: pip install jsonschema
|
|
|
|
- name: Debug issue body
|
|
run: |
|
|
echo "=== Issue Body ==="
|
|
cat << 'ISSUE_BODY_EOF'
|
|
${{ github.event.issue.body }}
|
|
ISSUE_BODY_EOF
|
|
|
|
- name: Save issue body to file
|
|
run: |
|
|
cat << 'ISSUE_BODY_EOF' > /tmp/issue_body.txt
|
|
${{ github.event.issue.body }}
|
|
ISSUE_BODY_EOF
|
|
|
|
- name: Validate submission
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
|
run: |
|
|
python -m src.contributions.validate_submission \
|
|
--issue-body-file /tmp/issue_body.txt \
|
|
--issue-number ${{ github.event.issue.number }}
|