branch #4
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: Build | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- main | |
- dev | |
push: | |
branches: | |
- main | |
- dev | |
- send-message | |
env: | |
SERVICE_NAME: rpkm67-gateway | |
IMAGE_NAME: ghcr.io/${{ github.repository }} | |
IMAGE_TAG: <WILL_BE_SET> | |
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\": \"PR: ${{ github.event.pull_request.title }}\" | |
} | |
] | |
}" \ | |
${{ secrets.RPKM67_DISCORD_WEBHOOK_URL }} |