Skip to content

Commit

Permalink
Upgrade to ci-alerts to v2 (#2859)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mo-Fatah authored Aug 15, 2023
1 parent 523b9f7 commit 127e989
Showing 1 changed file with 7 additions and 27 deletions.
34 changes: 7 additions & 27 deletions .github/workflows/slack-alerts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,18 @@ name: Slack CI Alerts

on:
workflow_run:
workflows: [CI, Python Airflow Operator, Build Release Images]
workflows: [CI, Python Airflow Operator, Build Release Images, Release Armada components, Release Armada components - RC]
types: [completed]

jobs:
on_push_failure:
on-failure:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.event == 'push' && github.event.workflow_run.head_branch == 'master'
steps:
- name: "Master Notification"
uses: Mo-Fatah/ci-alerts@v1
env:
webhook: ${{ secrets.SLACK_WEBHOOK }}
event: push
commit: ${{ github.sha }}
commit_url: https://github.com/armadaproject/armada/commit/${{ github.sha }}
author: ${{ github.actor }}
workflow_name: ${{ github.event.workflow_run.name }}
workflow_url: ${{ github.event.workflow_run.html_url}}

on_pull_request_failure:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.event == 'pull_request'
if: github.event.workflow_run.conclusion == 'failure'
steps:
- uses: actions/checkout@v3.3.0
- name: "Pull Request Notification"
uses: Mo-Fatah/ci-alerts@v1
- name: "Send Notification"
uses: Mo-Fatah/ci-alerts@v2
env:
webhook: ${{ secrets.SLACK_WEBHOOK }}
event: pr
commit: ${{ github.sha }}
commit_url: https://github.com/armadaproject/armada/commit/${{ github.sha }}
author: ${{ github.actor }}
workflow_name: ${{ github.event.workflow_run.name }}
workflow_url: ${{ github.event.workflow_run.html_url}}
users_path: ${{github.workspace}}/.github/gh-to-slackid
github_context: ${{ toJSON(github) }}
users_path: ${{github.workspace}}/.github/gh-to-slackid

0 comments on commit 127e989

Please sign in to comment.