Skip to content

Commit

Permalink
Add slack bot and failure message
Browse files Browse the repository at this point in the history
  • Loading branch information
ayellapragada committed Apr 11, 2024
1 parent b85c710 commit 8980173
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/acceptance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ permissions:
checks: write

jobs:
fail_test:
runs-on: ubuntu-20.04
steps:
- name: Fail Test
run: exit 1

apply_network:
name: Apply Network
uses: ./.github/workflows/terraform.yaml
Expand Down Expand Up @@ -108,3 +114,22 @@ jobs:
terraform_command: destroy
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}

notify_slack:
runs-on: ubuntu-20.04
defaults:
run:
shell: bash
steps:
- name: Notify Slack
if: failure()
uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844 # v1.23.0
continue-on-error: true
with:
channel-id: '#mission-control'
payload: |
{
"text": "TEST_MESSAGE, IGNORE - 'Flightdeck acceptance tests have failed.'",
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

0 comments on commit 8980173

Please sign in to comment.