From 127e9891742f1d39b5116d071f8a3d90ee56f437 Mon Sep 17 00:00:00 2001 From: Mohamed Abdelfatah <39927413+Mo-Fatah@users.noreply.github.com> Date: Tue, 15 Aug 2023 17:10:25 +0300 Subject: [PATCH] Upgrade to ci-alerts to v2 (#2859) --- .github/workflows/slack-alerts.yml | 34 ++++++------------------------ 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/.github/workflows/slack-alerts.yml b/.github/workflows/slack-alerts.yml index 3575873bcd3..7c799ce5470 100644 --- a/.github/workflows/slack-alerts.yml +++ b/.github/workflows/slack-alerts.yml @@ -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 \ No newline at end of file