From 712763e32a32ae12868b9252394a87fdd07cdfe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rald=20Barr=C3=A9?= Date: Fri, 1 Nov 2024 10:27:44 -0400 Subject: [PATCH] Use reusable workflow --- .github/workflows/renovate.yml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index e4b4dbc..e502aee 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -32,17 +32,8 @@ jobs: shell: bash run: cat renovate.log | jq --slurp -e 'any(.[].msg; test("^No repositories found")) | not' - # Slack application: https://api.slack.com/apps/A07LL1CS2N4/general - - name: Send notifications + - uses: gsoft-inc/wl-internal-reusable-workflows/send-slack-notification@main if: failure() && github.event_name == 'schedule' - shell: pwsh - run: | - Invoke-RestMethod ` - -Uri ${{ secrets.SLACK_WEBHOOK }} ` - -Headers @{ "Content-Type" = "application/json" } ` - -Method Post ` - -Body @" - { - "text": "The GitHub Renovate pipelines failed. Please check the logs: https://github.com/gsoft-inc/wl-reusable-workflows/actions/runs/${{github.run_id}}" - } - "@ + with: + webhook_url: ${{secrets.SLACK_WEBHOOK_URL_IDP_DEV_ALERTS}} + messageTemplate: "FailedJob"