Skip to content

Commit

Permalink
Update add-playlist-workflow.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Dark-Kernel authored Nov 24, 2024
1 parent b7f6fa2 commit bfa06d6
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/add-playlist-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- name: Install dependencies
run: |
apt update && apt install jq curl -y
sudo apt update && sudo apt install jq curl -y
- name: Validate JSON and process contribution
env:
Expand Down Expand Up @@ -132,7 +132,24 @@ jobs:
body: 'Thank you for your contribution! A pull request has been created with your changes. The repository owner will review and merge it soon.'
});
- name: Add comment
if: always()
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
try {
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'There was an error processing your contribution. Please check that your JSON is correctly formatted and includes all required fields.'
});
} catch (error) {
core.setFailed('Failed to post comment');
}
- name: Comment on issue if failed
if: failure()
uses: actions/github-script@v6
Expand Down

0 comments on commit bfa06d6

Please sign in to comment.