Skip to content

Commit

Permalink
CI: Notify Slack on test run
Browse files Browse the repository at this point in the history
  • Loading branch information
tchief committed Dec 6, 2023
1 parent 7e8c7b7 commit dd76e4a
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Notify Slack

on:
workflow_dispatch:
workflow_run:
workflows: ["Install CLI @PROD"]
types: [completed]

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}

steps:
- uses: actions/setup-node@v3
with:
node-version: lts/Hydrogen

- name: Install Slack bot
run: npm i -g @supernova-studio/ci-bot

- name: Get NPM version
id: package-version
uses: martinbeentjes/[email protected]

- name: Notify Slack channel on success
run: supernova-ci-bot slack-send-message -c "#ci-cli" -m "New version of Supernova CLI is published!\n - ${{ steps.package-version.outputs.current-version}}\n${{ secrets.SLACK_CC }}"
if: ${{ github.event.workflow_run.conclusion == 'success' }}

- name: Notify Slack channel on failure
run: supernova-ci-bot slack-send-message -c "#ci-cli" -m "Running smoke tests for CLI has failed!\n - ${{ steps.package-version.outputs.current-version}}\n${{ secrets.SLACK_CC }}"
if: ${{ github.event.workflow_run.conclusion == 'failure' }}

0 comments on commit dd76e4a

Please sign in to comment.