From 1044ba22b2208ad20a862bb208058d86c3d37922 Mon Sep 17 00:00:00 2001 From: Ruben Ruiz de Gauna Date: Thu, 6 Feb 2025 18:44:08 +0100 Subject: [PATCH] add slack notification --- .../recover_s3_repository_periodic_test.yml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/recover_s3_repository_periodic_test.yml b/.github/workflows/recover_s3_repository_periodic_test.yml index 3175adbb7..880460aba 100644 --- a/.github/workflows/recover_s3_repository_periodic_test.yml +++ b/.github/workflows/recover_s3_repository_periodic_test.yml @@ -107,3 +107,29 @@ jobs: - name: Delete .original run: | aws s3 rm --recursive "${{ env.TEST_FOLDER_ABS_PATH }}.original" + + - name: Send Slack notification to OHAI + if: ${{ failure() }} + id: slack + uses: slackapi/slack-github-action@v1.22.0 + with: + payload: | + { + "text": ":rotating_light: Dry-Run Recover S3 Repository failed :warning: :warning: :warning: @hero check <${{ env.GITHUB_JOB_URL }}> :rotating_light:" + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.OHAI_PRIVATE_SLACK_WEBHOOK }} + GITHUB_JOB_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + + - name: Send Slack notification to AC + if: ${{ failure() }} + id: slack + uses: slackapi/slack-github-action@v1.22.0 + with: + payload: | + { + "text": ":rotating_light: Dry-Run Recover S3 Repository failed :warning: :warning: :warning: @hero check <${{ env.GITHUB_JOB_URL }}> :rotating_light:" + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SUPER_SECRET_AGENT_SLACK_WEBHOOK }} + GITHUB_JOB_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}