Skip to content

Commit

Permalink
Merge pull request #2975 from rsksmart/vovchyk/slack-notif-fix
Browse files Browse the repository at this point in the history
build(slack-notification): Fix rit GH workflow to not send slack notification with empty token
  • Loading branch information
Vovchyk authored Feb 3, 2025
2 parents 9bef071 + b83c09b commit ab31be2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/rit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ jobs:
repo-owner: ${{ env.REPO_OWNER }}

- name: Send Slack Notification on Success
if: success() && github.event.pull_request.head.repo.owner.login == 'rsksmart'
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
env:
SLACK_BOT_TOKEN: ${{ secrets.GHA_SLACK_NOTIFICATION_TOKEN }}
GITHUB_EVENT_PULL_REQUEST_HTML_URL: ${{ github.event.pull_request.html_url }}
if: ${{ success() && github.event.pull_request.head.repo.owner.login == 'rsksmart' && env.SLACK_BOT_TOKEN != '' }}
with:
channel-id: ${{ vars.GHA_SLACK_NOTIFICATION_CHANNEL }}
payload: |
Expand All @@ -152,11 +152,11 @@ jobs:
}
- name: Send Slack Notification on Failure
if: failure() && github.event.pull_request.head.repo.owner.login == 'rsksmart'
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
env:
SLACK_BOT_TOKEN: ${{ secrets.GHA_SLACK_NOTIFICATION_TOKEN }}
GITHUB_EVENT_PULL_REQUEST_HTML_URL: ${{ github.event.pull_request.html_url }}
if: ${{ failure() && github.event.pull_request.head.repo.owner.login == 'rsksmart' && env.SLACK_BOT_TOKEN != '' }}
with:
channel-id: ${{ vars.GHA_SLACK_NOTIFICATION_CHANNEL }}
payload: |
Expand Down

0 comments on commit ab31be2

Please sign in to comment.