Skip to content

Commit 9a9f92f

Browse files
authored
Update docker-image.yml
1 parent bb06a11 commit 9a9f92f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/docker-image.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,36 @@ jobs:
1616
run: echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin
1717

1818
- name: Build and Push Docker Image
19+
id: docker_build
1920
run: |
2021
docker build -t shizarizvi/texpose .
2122
docker tag shizarizvi/texpose shizarizvi/texpose-app:latest
2223
docker push shizarizvi/texpose-app:latest
24+
continue-on-error: true
25+
26+
- name: Send Email Notification
27+
if: always() # Run this step regardless of success or failure
28+
uses: dawidd6/action-send-mail@v3
29+
with:
30+
server_address: smtp.gmail.com
31+
server_port: 587
32+
username: ${{ secrets.EMAIL_USERNAME }}
33+
password: ${{ secrets.EMAIL_PASSWORD }}
34+
subject: "Docker Image Build Status: ${{ job.status }}"
35+
to: "rizvi4400482@cloud.neduet.edu.pk"
36+
from: "GitHub Actions <${{ secrets.EMAIL_USERNAME }}>"
37+
body: |
38+
Hello,
39+
40+
The Docker image build process has completed with status: ${{ job.status }}
41+
42+
Repository: ${{ github.repository }}
43+
Commit: ${{ github.sha }}
44+
Branch: ${{ github.ref_name }}
45+
Workflow: ${{ github.workflow }}
46+
Run: ${{ github.run_id }}
47+
48+
Check details at: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
49+
50+
Best,
51+
GitHub Actions

0 commit comments

Comments
 (0)