Skip to content

Commit e4d3162

Browse files
committed
ci: add Slack notification for new releases in CI pipeline
1 parent 5c2353e commit e4d3162

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

‎.github/workflows/ci-pipeline.yml‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
env:
1111
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
1212
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
13+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
1314
BACKEND_IMAGE: abrhman/simple-go-backend
1415
FRONTEND_IMAGE: abrhman/simple-go-frontend
1516

@@ -91,4 +92,19 @@ jobs:
9192
- name: Push frontend image
9293
run: |
9394
docker push ${{ env.FRONTEND_IMAGE }}:${{ github.sha }}
94-
docker push ${{ env.FRONTEND_IMAGE }}:latest
95+
docker push ${{ env.FRONTEND_IMAGE }}:latest
96+
97+
- name: Notify Slack about new release
98+
uses: slackapi/slack-github-action@v1.24.0
99+
with:
100+
channel-id: 'deployments'
101+
slack-message: |
102+
🚀 New Release Ready for Deployment!
103+
• All tests passed successfully
104+
• Docker images built and pushed
105+
• Backend Image: ${{ env.BACKEND_IMAGE }}:${{ github.sha }}
106+
• Frontend Image: ${{ env.FRONTEND_IMAGE }}:${{ github.sha }}
107+
• Commit: ${{ github.sha }}
108+
• Branch: ${{ github.ref }}
109+
env:
110+
SLACK_BOT_TOKEN: ${{ env.SLACK_BOT_TOKEN }}

0 commit comments

Comments
 (0)