Skip to content

Commit

Permalink
Updates GA workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Tweener committed Feb 8, 2024
1 parent dd54bfb commit bc1a71f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 25 deletions.
27 changes: 2 additions & 25 deletions .github/workflows/buildDebug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,28 +47,5 @@ jobs:

notify:
needs: build
runs-on: ubuntu-latest
steps:
- name: Send notification on Slack
uses: rtCamp/[email protected]
if: ${{ success() }}
env:
SLACK_CHANNEL: ${{ vars.SLACK_GITHUB_ACTIONS_CHANNEL_NAME }}
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: ${{ vars.SLACK_GITHUB_ACTIONS_ICON_URL }}
SLACK_MESSAGE: ':white_check_mark: Build successful! :rocket:'
SLACK_TITLE: Kmplate-lib build status
SLACK_USERNAME: Github Actions CI
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}

- name: Send notification on Slack
uses: rtCamp/[email protected]
if: ${{ failure() }}
env:
SLACK_CHANNEL: ${{ vars.SLACK_GITHUB_ACTIONS_CHANNEL_NAME }}
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: ${{ vars.SLACK_GITHUB_ACTIONS_ICON_URL }}
SLACK_MESSAGE: ':x: Build failed! :pensive:'
SLACK_TITLE: Kmplate-lib build status
SLACK_USERNAME: Github Actions CI
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
uses: ./.github/workflows/notify.yml
secrets: inherit
35 changes: 35 additions & 0 deletions .github/workflows/notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Notify build status on Slack

on:
workflow_call:
secrets:
SLACK_WEBHOOK_URL:
required: true

jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Send notification on Slack
uses: rtCamp/[email protected]
if: ${{ success() }}
env:
SLACK_CHANNEL: ${{ vars.SLACK_GITHUB_ACTIONS_CHANNEL_NAME }}
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: ${{ vars.SLACK_GITHUB_ACTIONS_ICON_URL }}
SLACK_MESSAGE: ':white_check_mark: Build successful! :rocket:'
SLACK_TITLE: Kmplate-lib build status
SLACK_USERNAME: Github Actions CI
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}

- name: Send notification on Slack
uses: rtCamp/[email protected]
if: ${{ failure() }}
env:
SLACK_CHANNEL: ${{ vars.SLACK_GITHUB_ACTIONS_CHANNEL_NAME }}
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: ${{ vars.SLACK_GITHUB_ACTIONS_ICON_URL }}
SLACK_MESSAGE: ':x: Build failed! :pensive:'
SLACK_TITLE: Kmplate-lib build status
SLACK_USERNAME: Github Actions CI
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}

0 comments on commit bc1a71f

Please sign in to comment.