diff --git a/.github/workflows/nightly_build.yml b/.github/workflows/nightly_build.yml index ea9de75aa2..f9558cb067 100644 --- a/.github/workflows/nightly_build.yml +++ b/.github/workflows/nightly_build.yml @@ -224,35 +224,84 @@ jobs: push_to_registry: ${{ inputs.push_to_registry != false }} secrets: inherit - # slack-notification: - # name: Send Slack Notification - # needs: run-nightly-build - # runs-on: ubuntu-latest - # steps: - # - name: Send success notification to Slack - # if: success() - # uses: slackapi/slack-github-action@v1.26.0 - # with: - # payload: | - # { - # "channel": "#langflow-nightly-builds", - # "username": "GitHub Actions", - # "text": "Nightly Build Successful :white_check_mark:", - # "icon_emoji": ":rocket:" - # } - # env: - # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + slack-notification: + name: Send Slack Notification + needs: release-nightly-build + if: ${{ github.repository == 'langflow-ai/langflow' && always() }} + runs-on: ubuntu-latest + steps: + - name: Send failure notification to Slack + if: ${{ needs.release-nightly-build.result == 'failure' }} + run: | + curl -X POST -H 'Content-type: application/json' \ + --data '{ + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "❌ *Nightly Build Failed*" + } + }, + { + "type": "section", + "fields": [ + { + "type": "mrkdwn", + "text": "*Job:*\nrelease-nightly-build" + }, + { + "type": "mrkdwn", + "text": "*Status:*\n`${{ needs.release-nightly-build.result }}`" + } + ] + }, + { + "type": "context", + "elements": [ + { + "type": "mrkdwn", + "text": "" + } + ] + } + ] + }' ${{ secrets.LANGFLOW_ENG_SLACK_WEBHOOK_URL }} - # - name: Send failure notification to Slack - # if: failure() - # uses: slackapi/slack-github-action@v1.26.0 - # with: - # payload: | - # { - # "channel": "#langflow-nightly-builds", - # "username": "GitHub Actions", - # "text": "Nightly Build Failed :x:", - # "icon_emoji": ":warning:" - # } - # env: - # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + - name: Send success notification to Slack + if: ${{ needs.release-nightly-build.result == 'success' }} + run: | + curl -X POST -H 'Content-type: application/json' \ + --data '{ + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "✅ *Nightly Build Successful*" + } + }, + { + "type": "section", + "fields": [ + { + "type": "mrkdwn", + "text": "*Job:*\nrelease-nightly-build" + }, + { + "type": "mrkdwn", + "text": "*Status:*\n`${{ needs.release-nightly-build.result }}`" + } + ] + }, + { + "type": "context", + "elements": [ + { + "type": "mrkdwn", + "text": "" + } + ] + } + ] + }' ${{ secrets.LANGFLOW_ENG_SLACK_WEBHOOK_URL }} diff --git a/.secrets.baseline b/.secrets.baseline index 3f0dfc4692..7944a73010 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -153,7 +153,7 @@ "filename": ".github/workflows/nightly_build.yml", "hashed_secret": "3e26d6750975d678acb8fa35a0f69237881576b0", "is_verified": false, - "line_number": 170, + "line_number": 225, "is_secret": false } ], @@ -1402,5 +1402,5 @@ } ] }, - "generated_at": "2025-09-30T22:09:16Z" + "generated_at": "2025-10-07T17:37:54Z" }