Skip to content

Commit

Permalink
Merge branch 'master' into aabidsofi/k8s-switcher
Browse files Browse the repository at this point in the history
  • Loading branch information
aabidsofi19 authored Sep 6, 2023
2 parents 1e0e43b + 18ecc96 commit ef95e97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-and-release-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,21 +191,21 @@ jobs:

email-on-failure:
needs: [update-rest-api-docs, update-graphql-docs, build, ctlrelease, call-dde-release-workflow, call-helm-chart-releaser, email-meshery-release-notes-workflow, call-cncf-playground-rollout]
if: ${{ always() }}
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Find failed jobs.
run: |
curl "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs" | jq -r '.jobs[] | select(.conclusion == "failure") | "\(.name): \(.steps[] | select(.conclusion == "failure") | .name)\n\(.html_url)\n"' >> output.txt
# Save multi-line environment variables by using the delimiters syntex.
echo "EMAIL_BODY<<EOF" >> $GITHUB_ENV
echo "EMAIL_BODY=$(cat ./output.txt)" >> $GITHUB_ENV
echo "$(cat ./output.txt)" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Failed jobs summary
run: |
echo "${{ env.EMAIL_BODY }}"
- name: Send Email Notification
if: ${{ env.EMAIL_BODY != '' }}
if: env.EMAIL_BODY != ''
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
Expand Down

0 comments on commit ef95e97

Please sign in to comment.