Skip to content

Commit bd8c028

Browse files
authored
slack notifications and align files (#8)
1 parent 747b072 commit bd8c028

3 files changed

Lines changed: 34 additions & 2 deletions

File tree

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Merge
1+
name: Deploy Dev
22

33
on:
44
push:
@@ -101,3 +101,19 @@ jobs:
101101
git config user.email "github-actions[bot]@users.noreply.github.com"
102102
git add serving-api/dev/
103103
git diff --staged --quiet && echo "No changes to deploy" || (git commit -m "deploy serving-api ${{ github.sha }}" && git push)
104+
105+
notify:
106+
name: Slack Notification
107+
runs-on: ubuntu-latest
108+
needs: [changes, docker-backend, docker-frontend, deploy]
109+
if: always()
110+
steps:
111+
- name: Notify Slack
112+
uses: slackapi/slack-github-action@v2
113+
with:
114+
webhook-type: incoming-webhook
115+
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
116+
payload: |
117+
{
118+
"text": "${{ github.repository }} Deploy Dev — ${{ contains(needs.*.result, 'failure') && 'FAILED' || 'deployed' }}\nCommit: ${{ github.sha }}\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View run>"
119+
}
Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release
1+
name: Deploy Prod
22

33
on:
44
release:
@@ -87,3 +87,19 @@ jobs:
8787
git config user.email "github-actions[bot]@users.noreply.github.com"
8888
git add serving-api/prod/
8989
git diff --staged --quiet && echo "No changes to deploy" || (git commit -m "release serving-api ${{ github.event.release.tag_name }}" && git push)
90+
91+
notify:
92+
name: Slack Notification
93+
runs-on: ubuntu-latest
94+
needs: [validate-tag, docker-backend, docker-frontend, deploy]
95+
if: always()
96+
steps:
97+
- name: Notify Slack
98+
uses: slackapi/slack-github-action@v2
99+
with:
100+
webhook-type: incoming-webhook
101+
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
102+
payload: |
103+
{
104+
"text": "${{ github.repository }} Release — ${{ contains(needs.*.result, 'failure') && 'FAILED' || 'published' }}\nTag: ${{ github.event.release.tag_name }}\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View run>"
105+
}

0 commit comments

Comments
 (0)