diff --git a/.github/workflows/backend-ci.yaml b/.github/workflows/backend-ci.yaml index b1fa882..ab30923 100644 --- a/.github/workflows/backend-ci.yaml +++ b/.github/workflows/backend-ci.yaml @@ -4,6 +4,7 @@ on: push: branches: - "main" + - "developer" paths: - "packages/backend/**" - "packages/shared/**" @@ -59,3 +60,21 @@ jobs: --region ${GCP_LOCATION} \ --platform managed \ --allow-unauthenticated + + - name: Notify Success to Slack Channel + if: success() + uses: slackapi/slack-github-action@v1.26.0 + with: + channel-id: ${{ secrets.SLACK_CHANNEL_ID }} + slack-message: "✅ Backend Deployment Successful!\nRepository: polypay-backend\nBranch: ${{ github.ref_name }}\nEnvironment: prod\nBuild Status: ${{ job.status }}\nTriggered by: ${{ github.actor }}\n${{ github.event.head_commit.url }}" + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + + - name: Notify Failure to Slack Channel + if: failure() + uses: slackapi/slack-github-action@v1.26.0 + with: + channel-id: ${{ secrets.SLACK_CHANNEL_ID }} + slack-message: "❌ Backend Deployment Failed!\nRepository: polypay-backend\nBranch: ${{ github.ref_name }}\nEnvironment: prod\nBuild Status: ${{ job.status }}\nTriggered by: ${{ github.actor }}\n${{ github.event.head_commit.url }}" + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/frontend-ci.yaml b/.github/workflows/frontend-ci.yaml index 1e560d9..e122b70 100644 --- a/.github/workflows/frontend-ci.yaml +++ b/.github/workflows/frontend-ci.yaml @@ -4,6 +4,7 @@ on: push: branches: - "main" + - "developer" paths: - "packages/nextjs/**" - "packages/shared/**" @@ -60,3 +61,21 @@ jobs: --region ${GCP_LOCATION} \ --platform managed \ --allow-unauthenticated + + - name: Notify Success to Slack Channel + if: success() + uses: slackapi/slack-github-action@v1.26.0 + with: + channel-id: ${{ secrets.SLACK_CHANNEL_ID }} + slack-message: "✅ Frontend Deployment Successful!\nRepository: polypay-frontend\nBranch: ${{ github.ref_name }}\nEnvironment: prod\nBuild Status: ${{ job.status }}\nTriggered by: ${{ github.actor }}\n${{ github.event.head_commit.url }}" + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + + - name: Notify Failure to Slack Channel + if: failure() + uses: slackapi/slack-github-action@v1.26.0 + with: + channel-id: ${{ secrets.SLACK_CHANNEL_ID }} + slack-message: "❌ Frontend Deployment Failed!\nRepository: polypay-frontend\nBranch: ${{ github.ref_name }}\nEnvironment: prod\nBuild Status: ${{ job.status }}\nTriggered by: ${{ github.actor }}\n${{ github.event.head_commit.url }}" + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} \ No newline at end of file