Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send message #47

Merged
merged 5 commits into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@ on:
branches:
- main
- dev
- send-message

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

jobs:
send_message:
uses: ./.github/workflows/send-message.yml
secrets: inherit

build:
name: Build
runs-on: ubuntu-latest
Expand Down Expand Up @@ -69,6 +66,13 @@ jobs:
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache,mode=max

send_message:
needs: build
uses: ./.github/workflows/send-message.yml
secrets: inherit
with:
IMAGE_TAG: ${{ needs.build.outputs.IMAGE_TAG }}

cd:
name: Continuous Deployment
needs: build
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/send-message.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Send Messages

on:
workflow_call:
inputs:
IMAGE_TAG:
required: true
type: string

jobs:
send_message:
Expand All @@ -20,10 +24,7 @@ jobs:
\"name\": \"${{ github.actor }}\",
\"icon_url\": \"https://github.com/${{ github.actor }}.png\"
},
\"description\": \"**Service Name:** ${{ github.repository }}\n\n
**Details:**\n
${{ github.event.pull_request.title || '' }}
\",
\"description\": \"**Service Name:** ${{ github.repository }}\n\n**Details:**\n${{ github.event.pull_request.title || github.event.head_commit.message }}\",
\"color\": 5814783
}
]
Expand Down
Loading