Skip to content

Commit

Permalink
514P-270: Notify slack on failed workflows (#2050)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmsuzuki authored Feb 20, 2025
1 parent 401d61c commit a2ca360
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/deploy-internal-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,14 @@ jobs:
if: ${{ !inputs.dry-run }}
run: |
kubectl rollout status deployment/moosedeployment
notify-slack-on-failure:
needs: [deploy-internal]
runs-on: ubuntu-latest
if: failure() && github.ref == 'refs/heads/main'
steps:
- name: Notify Slack on failure
uses: 514-labs/[email protected]
with:
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-webhook-url: ${{ secrets.SLACK_GITHUB_ACTIONS_WEBHOOK_URL }}
11 changes: 11 additions & 0 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,14 @@ jobs:
run: pnpm install --frozen-lockfile
- name: Check prettier compliance
run: pnpm exec prettier --check './apps/**/*.{ts,tsx}'

notify-slack-on-failure:
needs: [format]
runs-on: ubuntu-latest
if: failure() && github.ref == 'refs/heads/main'
steps:
- name: Notify Slack on failure
uses: 514-labs/[email protected]
with:
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-webhook-url: ${{ secrets.SLACK_GITHUB_ACTIONS_WEBHOOK_URL }}
19 changes: 19 additions & 0 deletions .github/workflows/release-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -481,3 +481,22 @@ jobs:
cache-to: type=gha,mode=max
build-args: |
FRAMEWORK_VERSION=${{ needs.version.outputs.version }}
notify-slack-on-failure:
needs: [
build-and-publish-py-moose-lib,
package-and-publish-independant-ts-package,
package-and-publish-templates,
build-and-publish-binaries,
release-python,
publish-npm-base,
build-and-publish-fullstack-image
]
runs-on: ubuntu-latest
if: failure() && github.ref == 'refs/heads/main'
steps:
- name: Notify Slack on failure
uses: 514-labs/[email protected]
with:
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-webhook-url: ${{ secrets.SLACK_GITHUB_ACTIONS_WEBHOOK_URL }}
11 changes: 11 additions & 0 deletions .github/workflows/rfd-bot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,14 @@ jobs:
add: "rfd"
author_name: "🤖 RFD Bot"
message: "chore(rfd): 🤖 claim RFD ${{ env.RFD_NUMBER }}"

notify-slack-on-failure:
needs: [claim-rfd-number]
runs-on: ubuntu-latest
if: failure() && github.ref == 'refs/heads/main'
steps:
- name: Notify Slack on failure
uses: 514-labs/[email protected]
with:
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-webhook-url: ${{ secrets.SLACK_GITHUB_ACTIONS_WEBHOOK_URL }}
11 changes: 11 additions & 0 deletions .github/workflows/test-framework-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,14 @@ jobs:
with:
command: clippy
args: --manifest-path ./apps/framework-cli/Cargo.toml -- -D warnings

notify-slack-on-failure:
needs: [check, test-macos, test-ubuntu, lints]
runs-on: ubuntu-latest
if: failure() && github.ref == 'refs/heads/main'
steps:
- name: Notify Slack on failure
uses: 514-labs/[email protected]
with:
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-webhook-url: ${{ secrets.SLACK_GITHUB_ACTIONS_WEBHOOK_URL }}

0 comments on commit a2ca360

Please sign in to comment.