Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
bookpanda committed Jul 21, 2024
1 parent 3e4ed5f commit c5d8422
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 21 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ env:
IMAGE_TAG: <WILL_BE_SET>

jobs:
send_message:
uses: ./.github/workflows/send-message.yml
secrets:
inherit: true
with:
service_name: ${{ env.SERVICE_NAME }}

build:
name: Build
runs-on: ubuntu-latest
Expand Down
29 changes: 8 additions & 21 deletions .github/workflows/send-message.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
name: Build
name: Send Messages

on:
workflow_dispatch:
pull_request:
types:
- closed
branches:
- main
- dev
push:
branches:
- main
- dev
tags:
- v*

env:
SERVICE_NAME: rpkm67-gateway
IMAGE_NAME: ghcr.io/${{ github.repository }}
IMAGE_TAG: <WILL_BE_SET>
workflow_call:

jobs:
send_message:
Expand All @@ -30,14 +13,18 @@ jobs:
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 }}!\",
\"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 }}\"
\"description\": \"**Service Name:** ${{ inputs.service_name }}\n\n
**Details:**\n${
inputs.commit_message || inputs.pr_title
}\",
\"color\": 5814783
}
]
}" \
Expand Down

0 comments on commit c5d8422

Please sign in to comment.