A reusable GitHub Action that sends Slack notifications for production deployments with release notes.
- Sends Slack notifications for deployments
- Handles both deployments with new commits and rebuilds without new commits
- Configurable project name and release notes
- Links to GitHub Actions run results
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Notify Slack on Deployment
uses: ./.github/actions/prod-deployment-notification
with:
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
project-name: 'MyApp'
release-notes: ${{ steps.generate-release-notes.outputs.notes }}| Input | Description | Required |
|---|---|---|
webhook-url |
Slack webhook URL for notifications | ✅ |
project-name |
Name of the project being deployed | ✅ |
release-notes |
Release notes or commit information | ✅ |
name: Deploy to Production
on:
push:
branches: [main]
jobs:
mainnet-release:
runs-on: ubuntu-latest
outputs:
release_notes: ${{ steps.generate-notes.outputs.notes }}
steps:
- name: Generate Release Notes
id: generate-notes
run: |
# Your release notes generation logic here
echo "notes=Some release notes" >> $GITHUB_OUTPUT
notify-deployment:
runs-on: ubuntu-latest
needs: mainnet-release
steps:
- name: Notify Slack on Deployment
uses: ./.github/actions/prod-deployment-notification
with:
webhook-url: ${{ secrets.PRODUCTION_CHANNEL_WEBHOOK_URL }}
project-name: 'Helix'
release-notes: ${{ needs.mainnet-release.outputs.release_notes }}🚀 Helix deployed to Mainnet!
View the deployment results on Github: https://github.com/InjectiveLabs/injective-helix/actions/runs/1234567890.
The commits deployed are:
- feat: Add new feature
- fix: Fix critical bug
🚀 Helix Rebuilt on Mainnet! Good guys, close your eyes! 🛠️😄.
- A Slack webhook URL configured in your repository secrets
- The action must be run in a workflow that has access to the webhook URL secret
This action is part of the Injective Labs project.