-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
10 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,11 @@ name: Build all RAPIDS repositories | |
on: | ||
workflow_call: | ||
inputs: | ||
slack_token: | ||
description: "The Slack token to use for notifications. No notifications will be sent if not provided." | ||
enable_slack_alerts: | ||
description: "If true, a message will be posted to the CCCL GHA CI Alert channel if the workflow fails." | ||
required: false | ||
type: string | ||
slack_alert: | ||
description: "Slack channel ID for alert notifications." | ||
required: false | ||
type: string | ||
default: false | ||
type: boolean | ||
|
||
jobs: | ||
check-event: | ||
|
@@ -25,6 +22,7 @@ jobs: | |
run: | | ||
[[ '${{ github.event_name }}' == 'push' && '${{ github.repository }}' == 'NVIDIA/cccl' ]] || \ | ||
[[ '${{ github.event_name }}' == 'schedule' && '${{ github.repository }}' == 'NVIDIA/cccl' ]] || \ | ||
[[ '${{ github.event_name }}' == 'workflow_dispatch' && '${{ github.repository }}' == 'NVIDIA/cccl' ]] || \ | ||
[[ '${{ github.event_name }}' == 'pull_request' && '${{ github.repository }}' != 'NVIDIA/cccl' ]] \ | ||
&& echo "ok=true" | tee -a $GITHUB_OUTPUT \ | ||
|| echo "ok=false" | tee -a $GITHUB_OUTPUT; | ||
|
@@ -168,18 +166,18 @@ jobs: | |
notify-failure: | ||
name: Notify Slack of RAPIDS failure | ||
if: ${{ failure() && inputs.slack_token != '' && inputs.slack_alert != '' }} | ||
if: ${{ failure() && inputs.enable_slack_alerts }} | ||
needs: build-rapids | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Notify | ||
uses: slackapi/[email protected] | ||
env: | ||
SLACK_BOT_TOKEN: ${{ inputs.slack_token }} | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFIER_BOT_TOKEN }} | ||
WORKFLOW_TYPE: ${{ github.workflow }} | ||
SUMMARY_URL: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} | ||
with: | ||
channel-id: ${{ inputs.slack_alert }} | ||
channel-id: ${{ secrets.SLACK_CHANNEL_CI_ALERT }} | ||
slack-message: | | ||
RAPIDS build in workflow '${{ env.WORKFLOW_TYPE }}' failed. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters