Skip to content

Commit

Permalink
Send emails on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed May 23, 2020
1 parent 0b115fe commit 322c2bb
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ jobs:
- run: npm i
- run: npm run build
- run: npm test
- name: Send mail on fail
uses: dawidd6/action-send-mail@v2
if: ${{ failure() }}
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{secrets.MAIL_USERNAME}}
password: ${{secrets.MAIL_PASSWORD}}
subject: Github Actions job result
body: Test job of ${{github.repository}} failed!
to: ${{secrets.MAIL_TARGET}}
from: Github Actions

publish-npm:
needs: build
Expand All @@ -30,3 +42,15 @@ jobs:
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- name: Send mail on fail
uses: dawidd6/action-send-mail@v2
if: ${{ failure() }}
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{secrets.MAIL_USERNAME}}
password: ${{secrets.MAIL_PASSWORD}}
subject: Github Actions job result
body: Publish job of ${{github.repository}} failed!
to: ${{secrets.MAIL_TARGET}}
from: Github Actions

0 comments on commit 322c2bb

Please sign in to comment.