diff --git a/.github/workflows/build-fork.yml b/.github/workflows/build-fork.yml index 0f8ee0b92b..f2b2c081f8 100644 --- a/.github/workflows/build-fork.yml +++ b/.github/workflows/build-fork.yml @@ -25,3 +25,19 @@ jobs: - name: Upload artifacts uses: ./.github/actions/upload-artifacts + + NotifyFailure: + needs: [build] + runs-on: ubuntu-latest + if: ${{ failure() }} + steps: + - id: text + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: echo "out=${{ github.workflow }}:\t<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>\\n $(gh api /repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs | jq -c '.jobs | .[] | select( .conclusion | contains("failure"))' | jq -r '"- <\(.html_url)|\(.name)>\\n"' | tr '\n' ' ')" >> $GITHUB_OUTPUT + + - name: Webhook + uses: joelwmale/webhook-action@master + with: + url: ${{ secrets.WEBHOOK_URL }} + body: '{"text": "${{ steps.text.outputs.out }}"}' diff --git a/.github/workflows/build-test-deploy.yml b/.github/workflows/build-test-deploy.yml index 5bdb992ed6..70ee24d8a9 100644 --- a/.github/workflows/build-test-deploy.yml +++ b/.github/workflows/build-test-deploy.yml @@ -296,3 +296,19 @@ jobs: with: PINATA_HASH: '${{ needs.deploy.outputs.pinata_hash }}' secrets: inherit + + NotifyFailure: + needs: [update_domains_no_cypress,update_domains,cypress_app_functionality,cypress_additional_v3,cypress_additional_v2,cypress_full_v3,cypress_full_v2,deploy,next_js_analyze,cypress_smoke_v3,cypress_smoke_v2,build_staging,build] + runs-on: ubuntu-latest + if: ${{ failure() }} + steps: + - id: text + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: echo "out=${{ github.workflow }}:\t<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>\\n $(gh api /repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs | jq -c '.jobs | .[] | select( .conclusion | contains("failure"))' | jq -r '"- <\(.html_url)|\(.name)>\\n"' | tr '\n' ' ')" >> $GITHUB_OUTPUT + + - name: Webhook + uses: joelwmale/webhook-action@master + with: + url: ${{ secrets.WEBHOOK_URL }} + body: '{"text": "${{ steps.text.outputs.out }}"}' diff --git a/.github/workflows/crowdin-download.yml b/.github/workflows/crowdin-download.yml index d1187147a5..c0b6ac12f8 100644 --- a/.github/workflows/crowdin-download.yml +++ b/.github/workflows/crowdin-download.yml @@ -54,3 +54,19 @@ jobs: git push exit fi + + NotifyFailure: + needs: [download-from-crowdin] + runs-on: ubuntu-latest + if: ${{ failure() }} + steps: + - id: text + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: echo "out=${{ github.workflow }}:\t<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>\\n $(gh api /repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs | jq -c '.jobs | .[] | select( .conclusion | contains("failure"))' | jq -r '"- <\(.html_url)|\(.name)>\\n"' | tr '\n' ' ')" >> $GITHUB_OUTPUT + + - name: Webhook + uses: joelwmale/webhook-action@master + with: + url: ${{ secrets.WEBHOOK_URL }} + body: '{"text": "${{ steps.text.outputs.out }}"}' diff --git a/.github/workflows/crowdin-upload.yml b/.github/workflows/crowdin-upload.yml index 5ebbd717a3..8b0acc0ee1 100644 --- a/.github/workflows/crowdin-upload.yml +++ b/.github/workflows/crowdin-upload.yml @@ -29,3 +29,19 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_TOKEN }} + + NotifyFailure: + needs: [upload-to-crowdin] + runs-on: ubuntu-latest + if: ${{ failure() }} + steps: + - id: text + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: echo "out=${{ github.workflow }}:\t<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>\\n $(gh api /repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs | jq -c '.jobs | .[] | select( .conclusion | contains("failure"))' | jq -r '"- <\(.html_url)|\(.name)>\\n"' | tr '\n' ' ')" >> $GITHUB_OUTPUT + + - name: Webhook + uses: joelwmale/webhook-action@master + with: + url: ${{ secrets.WEBHOOK_URL }} + body: '{"text": "${{ steps.text.outputs.out }}"}' diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index fe461b4243..f50ccd7929 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -18,3 +18,19 @@ jobs: uses: actions/checkout@v3 - name: 'Dependency Review' uses: actions/dependency-review-action@v2 + + NotifyFailure: + needs: [dependency-review] + runs-on: ubuntu-latest + if: ${{ failure() }} + steps: + - id: text + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: echo "out=${{ github.workflow }}:\t<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>\\n $(gh api /repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs | jq -c '.jobs | .[] | select( .conclusion | contains("failure"))' | jq -r '"- <\(.html_url)|\(.name)>\\n"' | tr '\n' ' ')" >> $GITHUB_OUTPUT + + - name: Webhook + uses: joelwmale/webhook-action@master + with: + url: ${{ secrets.WEBHOOK_URL }} + body: '{"text": "${{ steps.text.outputs.out }}"}' diff --git a/.github/workflows/i18n-check.yml b/.github/workflows/i18n-check.yml index 01e55df016..aee5aa7788 100644 --- a/.github/workflows/i18n-check.yml +++ b/.github/workflows/i18n-check.yml @@ -32,3 +32,19 @@ jobs: exit 1 exit fi + + NotifyFailure: + needs: [i18n-check] + runs-on: [self-hosted] + if: ${{ failure() }} + steps: + - id: text + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: echo "out=${{ github.workflow }}:\t<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>\\n $(gh api /repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs | jq -c '.jobs | .[] | select( .conclusion | contains("failure"))' | jq -r '"- <\(.html_url)|\(.name)>\\n"' | tr '\n' ' ')" >> $GITHUB_OUTPUT + + - name: Webhook + uses: joelwmale/webhook-action@master + with: + url: ${{ secrets.WEBHOOK_URL }} + body: '{"text": "${{ steps.text.outputs.out }}"}' diff --git a/.github/workflows/test-deploy-fork.yml b/.github/workflows/test-deploy-fork.yml index 955233292f..af7795b453 100644 --- a/.github/workflows/test-deploy-fork.yml +++ b/.github/workflows/test-deploy-fork.yml @@ -308,3 +308,19 @@ jobs: SUCCESS: 'true' PULL_REQUEST_NUMBER: ${{ env.PR_NUMBER }} TOKEN: ${{ secrets.GITHUB_TOKEN }} + + NotifyFailure: + needs: [cypress_app_functionality,cypress_additional_v3,cypress_additional_v2,cypress_full_v3,cypress_full_v2,deploy_fork,cypress_smoke_v3,cypress_smoke_v2,next_js_analyze,prepare_jobs] + runs-on: ubuntu-latest + if: ${{ failure() }} + steps: + - id: text + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: echo "out=${{ github.workflow }}:\t<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>\\n $(gh api /repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs | jq -c '.jobs | .[] | select( .conclusion | contains("failure"))' | jq -r '"- <\(.html_url)|\(.name)>\\n"' | tr '\n' ' ')" >> $GITHUB_OUTPUT + + - name: Webhook + uses: joelwmale/webhook-action@master + with: + url: ${{ secrets.WEBHOOK_URL }} + body: '{"text": "${{ steps.text.outputs.out }}"}' diff --git a/.github/workflows/update-cache.yml b/.github/workflows/update-cache.yml index c4b699d4ad..0f9d452e05 100644 --- a/.github/workflows/update-cache.yml +++ b/.github/workflows/update-cache.yml @@ -35,3 +35,19 @@ jobs: git push exit fi + + NotifyFailure: + needs: [cache-refresh] + runs-on: ubuntu-latest + if: ${{ failure() }} + steps: + - id: text + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: echo "out=${{ github.workflow }}:\t<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>\\n $(gh api /repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs | jq -c '.jobs | .[] | select( .conclusion | contains("failure"))' | jq -r '"- <\(.html_url)|\(.name)>\\n"' | tr '\n' ' ')" >> $GITHUB_OUTPUT + + - name: Webhook + uses: joelwmale/webhook-action@master + with: + url: ${{ secrets.WEBHOOK_URL }} + body: '{"text": "${{ steps.text.outputs.out }}"}' diff --git a/.github/workflows/update-prod-staging.yml b/.github/workflows/update-prod-staging.yml index 5c74a7fd5b..35f2329050 100644 --- a/.github/workflows/update-prod-staging.yml +++ b/.github/workflows/update-prod-staging.yml @@ -104,3 +104,19 @@ jobs: CF_ZONE_ID: '${{ secrets.CF_ZONE_ID }}' HASH: '${{ steps.pinata.outputs.hash }}' CF_DEPLOYMENT_DOMAIN: staging.aave.com + + NotifyFailure: + needs: [staging,production] + runs-on: ubuntu-latest + if: ${{ failure() }} + steps: + - id: text + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: echo "out=${{ github.workflow }}:\t<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>\\n $(gh api /repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs | jq -c '.jobs | .[] | select( .conclusion | contains("failure"))' | jq -r '"- <\(.html_url)|\(.name)>\\n"' | tr '\n' ' ')" >> $GITHUB_OUTPUT + + - name: Webhook + uses: joelwmale/webhook-action@master + with: + url: ${{ secrets.WEBHOOK_URL }} + body: '{"text": "${{ steps.text.outputs.out }}"}'