Skip to content

Commit

Permalink
Update Discord webhook variables
Browse files Browse the repository at this point in the history
  • Loading branch information
xuelink committed Mar 2, 2024
1 parent 4102cad commit d523ab6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/discord_issue_bug_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
- name: Send Discord Github Issues
env:
DISCORD_GITHUB_ISSUES_WEBHOOK: ${{ secrets.DISCORD_GITHUB_ISSUES_WEBHOOK }}
DISCORD_WEBHOOK: ${{ secrets.DISCORD_GITHUB_ISSUES_WEBHOOK }}
ISSUE_URL: ${{ env.issue_url }}
ISSUE_TITLE: ${{ env.issue_title }}
REPO_NAME: ${{ env.repo_name }}
run: |
SUBTITLE="New issue in Repo: $REPO_NAME, Title: $ISSUE_TITLE"
PAYLOAD=$(jq -n --arg url "$ISSUE_URL" --arg st "$SUBTITLE" '{content: ($st + "\n\n" + $url)}')
curl -H "Content-Type: application/json" -X POST -d "$PAYLOAD" $DISCORD_GITHUB_ISSUES_WEBHOOK
curl -H "Content-Type: application/json" -X POST -d "$PAYLOAD" $DISCORD_WEBHOOK
4 changes: 2 additions & 2 deletions .github/workflows/discord_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
- name: Send Discord Notification
env:
DISCORD_GITHUB_RELEASES_WEBHOOK: ${{ secrets.DISCORD_GITHUB_RELEASES_WEBHOOK }}
DISCORD_WEBHOOK: ${{ secrets.DISCORD_GITHUB_RELEASES_WEBHOOK }}
RELEASE_NOTES: ${{ env.release_notes }}
RELEASE_URL: ${{ env.release_url }}
RELEASE_VERSION: ${{ env.release_version }}
REPO_NAME: ${{ env.repo_name }}
run: |
SUBTITLE="Release version: $RELEASE_VERSION, Repo: $REPO_NAME"
PAYLOAD=$(jq -n --arg rn "$RELEASE_NOTES" --arg url "$RELEASE_URL" --arg st "$SUBTITLE" '{content: ($st + "\n\n" + $rn + "\n\n" + $url)}')
curl -H "Content-Type: application/json" -X POST -d "$PAYLOAD" $DISCORD_GITHUB_RELEASES_WEBHOOK
curl -H "Content-Type: application/json" -X POST -d "$PAYLOAD" $DISCORD_WEBHOOK

0 comments on commit d523ab6

Please sign in to comment.