-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from isd-sgcu/dev
update main
- Loading branch information
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Send Messages | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
IMAGE_TAG: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
send_message: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Send message to Discord | ||
run: | | ||
curl -X POST -H "Content-Type: application/json" \ | ||
-H "Authorization: Bot ${{ secrets.RPKM67_DISCORD_API_KEY }}" \ | ||
-d "{ | ||
\"content\": \"A new push has been made to the **${{ github.event.pull_request.base.ref }}** branch by ${{ github.actor }}!\", | ||
\"embeds\": [ | ||
{ | ||
\"author\": { | ||
\"name\": \"${{ github.actor }}\", | ||
\"icon_url\": \"https://github.com/${{ github.actor }}.png\" | ||
}, | ||
\"description\": \"**Service Name:** ${{ github.repository }}\n\n**Version:**\n${{ inputs.IMAGE_TAG }}\n\n**Details:**\n${{ github.event.pull_request.title || github.event.head_commit.message }}\", | ||
\"color\": 5814783 | ||
} | ||
] | ||
}" \ | ||
${{ secrets.RPKM67_DISCORD_WEBHOOK_URL }} |