Skip to content

Commit

Permalink
Add Email notification to build step
Browse files Browse the repository at this point in the history
  • Loading branch information
Dcrammer777 committed Oct 23, 2023
1 parent 84f61df commit cd8f6b1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,15 @@ jobs:

- name: Push Docker Image to DOCR
run: docker push registry.digitalocean.com/dc-containers-test/${{ steps.repo_name.outputs.REPO_NAME }}:${{ steps.bump_version.outputs.new_tag || 'latest' }}

- name: Send email
uses: dawidd6/action-send-mail@v2
with:
server_address: ${{secrets.EMAIL_SERVER_ADDRESS}}
server_port: 465
username: ${{secrets.EMAIL_USERNAME}}
password: ${{secrets.EMAIL_PASSWORD}}
subject: Build completed!
to: david@davidcrammer.com
from: ${{secrets.EMAIL_USERNAME}}
body: Build has been completed.
1 change: 0 additions & 1 deletion src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ app.listen(PORT, async () => {
console.log(`App listening at port ${PORT}`)
try {
await sequelize.sync()
console.log("Database synced!")
} catch (error) {
console.error("Error syncing database:", error)
}
Expand Down

0 comments on commit cd8f6b1

Please sign in to comment.