Skip to content

Commit

Permalink
Add Discord notifications for SDK deployment start and success
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrwitek committed Oct 23, 2024
1 parent ae345f4 commit b8878ef
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/deploy-sdk-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,20 @@ jobs:
CONFIG_URL: ${{ secrets.CONFIG_URL }}
CONFIG_URL_RAYS: ${{ secrets.CONFIG_URL_RAYS }}
steps:
- name: Send start notification to Discord
uses: Ilshidur/action-discord@0.3.2
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_SDK_DEPLOY }}
DISCORD_EMBEDS:
'[{"title":"Link to GitHub Action:
${{github.run_id}}","url":"https://github.com/${{github.repository}}/actions/runs/${{github.run_id
}}"}]'
with:
args:
'SDK deployment `${{github.run_id}}` started on production πŸš€ (from branch `${{
github.ref_name }}` by [${{github.triggering_actor
}}](https://github.com/${{github.triggering_actor }}).'

- name: Git clone the repository
uses: actions/checkout@v3

Expand Down Expand Up @@ -72,3 +86,10 @@ jobs:
- name: Deploy app
run: |
pnpm run sst:deploy:sdk:prod
- name: Send success notification to Discord
uses: Ilshidur/action-discord@0.3.2
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_SDK_DEPLOY }}
with:
args: 'SDK deployment `${{github.run_id}}` finished successfully on staging πŸŽ‰\n '
11 changes: 5 additions & 6 deletions .github/workflows/deploy-sdk-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@ jobs:
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_SDK_DEPLOY }}
DISCORD_EMBEDS:
'[{"title":"Link to run:
'[{"title":"Link to GitHub Action:
${{github.run_id}}","url":"https://github.com/${{github.repository}}/actions/runs/${{github.run_id
}}"}]'
with:
args:
'SDK deployment started on staging πŸš€ (from branch `${{ github.ref_name }}` by
[${{github.triggering_actor }}](https://github.com/${{github.triggering_actor }}).'
'SDK deployment `${{github.run_id}}` started on staging πŸš€ (from branch `${{
github.ref_name }}` by [${{github.triggering_actor
}}](https://github.com/${{github.triggering_actor }}).'

- name: Git clone the repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -92,9 +93,7 @@ jobs:
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_SDK_DEPLOY }}
with:
args:
'SDK deployed successfully on staging πŸŽ‰\n (from ${{ github.ref }} by
${{github.triggering_actor }}).'
args: 'SDK deployment `${{github.run_id}}` finished successfully on staging πŸŽ‰\n '

- name: Trigger e2e tests in e2e-tests repository
env:
Expand Down

0 comments on commit b8878ef

Please sign in to comment.