feat: add playlists for (t3gg, fastify & shadcn) #59
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 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- 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 | |
- name: Read verification result | |
id: read-result | |
run: | | |
if [ -f result.txt ]; then | |
RESULT=$(cat result.txt) | |
echo "RESULT<<EOF" >> $GITHUB_ENV | |
echo "$RESULT" >> $GITHUB_ENV | |
echo "EOF" >> $GITHUB_ENV | |
else | |
echo "RESULT=Verification script did not produce a result file." >> $GITHUB_ENV | |
fi | |
- name: Comment on PR | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const output = process.env.RESULT || "❌ Playlist verification failed."; | |
await github.rest.issues.createComment({ | |
...context.repo, | |
issue_number: context.issue.number, | |
body: output | |
}); | |
- name: Set workflow status | |
if: ${{ !startsWith(env.RESULT, '✅ Playlist verification passed!') }} | |
run: exit 1 |