Update playlist.json #13
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: Verify Playlist Submission | |
on: | |
pull_request_target: | |
paths: | |
- 'playlist.json' | |
permissions: | |
contents: read | |
issues: write | |
pull-requests: write | |
jobs: | |
verify: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install jsonschema requests | |
- name: Run verification script | |
id: verify | |
run: python .github/scripts/verify_playlist.py | |
continue-on-error: true | |
- name: Check verification result | |
if: steps.verify.outcome != 'success' | |
run: exit 1 | |
- name: Sieve Manager | |
if: steps.verify.outcome == 'success' # Only run if verification passed | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} # Ensure this is correct | |
script: | | |
const output = "✅ Playlist verification passed! Your submission looks good."; | |
const issueNumber = context.payload.pull_request.number; // Use pull request number | |
await github.rest.issues.createComment({ | |
owner: context.repo.owner, | |
repo: context.repo.name, | |
issue_number: issueNumber, | |
body: output | |
}); | |
- name: Sieve Manager | |
run: | | |
echo "Owner: ${{ github.repository_owner }}" | |
echo "Repo: ${{ github.event.repository.name }}" | |
echo "Issue Number: ${{ steps.verify.outputs.issue_number }}" | |