Skip to content

Commit

Permalink
slack notify
Browse files Browse the repository at this point in the history
  • Loading branch information
ryichando committed Jan 15, 2025
1 parent 70a204b commit 8c5c7fb
Show file tree
Hide file tree
Showing 15 changed files with 232 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Docker Build
run-name: Docker Build (${{ github.event.inputs.target }})

on:
workflow_dispatch:
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/example_cards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

env:
VAST_API_KEY: ${{ secrets.VAST_API_KEY }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
EXAMPLE_NAME: cards
HELPER_PATH: .github/workflows/vast/helper.sh

Expand Down Expand Up @@ -66,3 +67,16 @@ jobs:
- name: shutdown
if: always()
run: bash $HELPER_PATH delete

notify_failure:
runs-on: ${{ github.event.inputs.runner }}
needs: run
if: ${{ failure() }}
steps:

- name: Slack Notification Failure
uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: Deploy / Failure
SLACK_COLOR: danger
SLACK_MESSAGE: One or more tests failed.
14 changes: 14 additions & 0 deletions .github/workflows/example_curtain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

env:
VAST_API_KEY: ${{ secrets.VAST_API_KEY }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
EXAMPLE_NAME: curtain
HELPER_PATH: .github/workflows/vast/helper.sh

Expand Down Expand Up @@ -66,3 +67,16 @@ jobs:
- name: shutdown
if: always()
run: bash $HELPER_PATH delete

notify_failure:
runs-on: ${{ github.event.inputs.runner }}
needs: run
if: ${{ failure() }}
steps:

- name: Slack Notification Failure
uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: Deploy / Failure
SLACK_COLOR: danger
SLACK_MESSAGE: One or more tests failed.
14 changes: 14 additions & 0 deletions .github/workflows/example_domino.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

env:
VAST_API_KEY: ${{ secrets.VAST_API_KEY }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
EXAMPLE_NAME: domino
HELPER_PATH: .github/workflows/vast/helper.sh

Expand Down Expand Up @@ -66,3 +67,16 @@ jobs:
- name: shutdown
if: always()
run: bash $HELPER_PATH delete

notify_failure:
runs-on: ${{ github.event.inputs.runner }}
needs: run
if: ${{ failure() }}
steps:

- name: Slack Notification Failure
uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: Deploy / Failure
SLACK_COLOR: danger
SLACK_MESSAGE: One or more tests failed.
14 changes: 14 additions & 0 deletions .github/workflows/example_drape.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

env:
VAST_API_KEY: ${{ secrets.VAST_API_KEY }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
EXAMPLE_NAME: drape
HELPER_PATH: .github/workflows/vast/helper.sh

Expand Down Expand Up @@ -66,3 +67,16 @@ jobs:
- name: shutdown
if: always()
run: bash $HELPER_PATH delete

notify_failure:
runs-on: ${{ github.event.inputs.runner }}
needs: run
if: ${{ failure() }}
steps:

- name: Slack Notification Failure
uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: Deploy / Failure
SLACK_COLOR: danger
SLACK_MESSAGE: One or more tests failed.
14 changes: 14 additions & 0 deletions .github/workflows/example_friction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

env:
VAST_API_KEY: ${{ secrets.VAST_API_KEY }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
EXAMPLE_NAME: friction
HELPER_PATH: .github/workflows/vast/helper.sh

Expand Down Expand Up @@ -66,3 +67,16 @@ jobs:
- name: shutdown
if: always()
run: bash $HELPER_PATH delete

notify_failure:
runs-on: ${{ github.event.inputs.runner }}
needs: run
if: ${{ failure() }}
steps:

- name: Slack Notification Failure
uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: Deploy / Failure
SLACK_COLOR: danger
SLACK_MESSAGE: One or more tests failed.
14 changes: 14 additions & 0 deletions .github/workflows/example_hang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

env:
VAST_API_KEY: ${{ secrets.VAST_API_KEY }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
EXAMPLE_NAME: hang
HELPER_PATH: .github/workflows/vast/helper.sh

Expand Down Expand Up @@ -66,3 +67,16 @@ jobs:
- name: shutdown
if: always()
run: bash $HELPER_PATH delete

notify_failure:
runs-on: ${{ github.event.inputs.runner }}
needs: run
if: ${{ failure() }}
steps:

- name: Slack Notification Failure
uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: Deploy / Failure
SLACK_COLOR: danger
SLACK_MESSAGE: One or more tests failed.
14 changes: 14 additions & 0 deletions .github/workflows/example_needle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

env:
VAST_API_KEY: ${{ secrets.VAST_API_KEY }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
EXAMPLE_NAME: needle
HELPER_PATH: .github/workflows/vast/helper.sh

Expand Down Expand Up @@ -66,3 +67,16 @@ jobs:
- name: shutdown
if: always()
run: bash $HELPER_PATH delete

notify_failure:
runs-on: ${{ github.event.inputs.runner }}
needs: run
if: ${{ failure() }}
steps:

- name: Slack Notification Failure
uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: Deploy / Failure
SLACK_COLOR: danger
SLACK_MESSAGE: One or more tests failed.
14 changes: 14 additions & 0 deletions .github/workflows/example_stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

env:
VAST_API_KEY: ${{ secrets.VAST_API_KEY }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
EXAMPLE_NAME: stack
HELPER_PATH: .github/workflows/vast/helper.sh

Expand Down Expand Up @@ -66,3 +67,16 @@ jobs:
- name: shutdown
if: always()
run: bash $HELPER_PATH delete

notify_failure:
runs-on: ${{ github.event.inputs.runner }}
needs: run
if: ${{ failure() }}
steps:

- name: Slack Notification Failure
uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: Deploy / Failure
SLACK_COLOR: danger
SLACK_MESSAGE: One or more tests failed.
14 changes: 14 additions & 0 deletions .github/workflows/example_trampoline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

env:
VAST_API_KEY: ${{ secrets.VAST_API_KEY }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
EXAMPLE_NAME: trampoline
HELPER_PATH: .github/workflows/vast/helper.sh

Expand Down Expand Up @@ -66,3 +67,16 @@ jobs:
- name: shutdown
if: always()
run: bash $HELPER_PATH delete

notify_failure:
runs-on: ${{ github.event.inputs.runner }}
needs: run
if: ${{ failure() }}
steps:

- name: Slack Notification Failure
uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: Deploy / Failure
SLACK_COLOR: danger
SLACK_MESSAGE: One or more tests failed.
14 changes: 14 additions & 0 deletions .github/workflows/example_trapped.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

env:
VAST_API_KEY: ${{ secrets.VAST_API_KEY }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
EXAMPLE_NAME: trapped
HELPER_PATH: .github/workflows/vast/helper.sh

Expand Down Expand Up @@ -66,3 +67,16 @@ jobs:
- name: shutdown
if: always()
run: bash $HELPER_PATH delete

notify_failure:
runs-on: ${{ github.event.inputs.runner }}
needs: run
if: ${{ failure() }}
steps:

- name: Slack Notification Failure
uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: Deploy / Failure
SLACK_COLOR: danger
SLACK_MESSAGE: One or more tests failed.
14 changes: 14 additions & 0 deletions .github/workflows/example_twist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

env:
VAST_API_KEY: ${{ secrets.VAST_API_KEY }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
EXAMPLE_NAME: twist
HELPER_PATH: .github/workflows/vast/helper.sh

Expand Down Expand Up @@ -66,3 +67,16 @@ jobs:
- name: shutdown
if: always()
run: bash $HELPER_PATH delete

notify_failure:
runs-on: ${{ github.event.inputs.runner }}
needs: run
if: ${{ failure() }}
steps:

- name: Slack Notification Failure
uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: Deploy / Failure
SLACK_COLOR: danger
SLACK_MESSAGE: One or more tests failed.
34 changes: 34 additions & 0 deletions .github/workflows/slack-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Slack Notification

on:
workflow_dispatch:

env:
SLACK_USERNAME: DeployBot
SLACK_ICON: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

jobs:
slackNotification:
name: Slack-Notification
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Slack Notification Success
uses: rtCamp/action-slack-notify@v2
if: ${{ success() }}
env:
SLACK_TITLE: Deploy / Success
SLACK_COLOR: good
SLACK_MESSAGE: All tests passed.

- name: Slack Notification Failure
uses: rtCamp/action-slack-notify@v2
if: ${{ failure() }}
env:
SLACK_TITLE: Deploy / Failure
SLACK_COLOR: danger
SLACK_MESSAGE: Tests failed.
14 changes: 14 additions & 0 deletions .github/workflows/template/example_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

env:
VAST_API_KEY: ${{ secrets.VAST_API_KEY }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
EXAMPLE_NAME: ****
HELPER_PATH: .github/workflows/vast/helper.sh

Expand Down Expand Up @@ -66,3 +67,16 @@ jobs:
- name: shutdown
if: always()
run: bash $HELPER_PATH delete

notify_failure:
runs-on: ${{ github.event.inputs.runner }}
needs: run
if: ${{ failure() }}
steps:

- name: Slack Notification Failure
uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: Deploy / Failure
SLACK_COLOR: danger
SLACK_MESSAGE: One or more tests failed.
30 changes: 29 additions & 1 deletion .github/workflows/vast-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

env:
VAST_API_KEY: ${{ secrets.VAST_API_KEY }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
HELPER_PATH: .github/workflows/vast/helper.sh

jobs:
Expand Down Expand Up @@ -112,4 +113,31 @@ jobs:

- name: shutdown
if: always()
run: bash $HELPER_PATH delete
run: bash $HELPER_PATH delete

notify_success:
runs-on: ${{ github.event.inputs.runner }}
needs: [part_1, part_2, part_3, part_4]
if: ${{ success() }}
steps:

- name: Slack Notification Success
uses: rtCamp/action-slack-notify@v2
if: ${{ success() }}
env:
SLACK_TITLE: Deploy / Success
SLACK_COLOR: good
SLACK_MESSAGE: All tests passed.

notify_failure:
runs-on: ${{ github.event.inputs.runner }}
needs: [part_1, part_2, part_3, part_4]
if: ${{ failure() }}
steps:

- name: Slack Notification Failure
uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: Deploy / Failure
SLACK_COLOR: danger
SLACK_MESSAGE: One or more tests failed.

0 comments on commit 8c5c7fb

Please sign in to comment.