Skip to content

Commit 751197d

Browse files
authored
Merge pull request #32 from pasindu07/php-8.3-ubuntu-24.04
Fixed issue with Github workflow email notification
2 parents 0f65e2c + 3712944 commit 751197d

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/build-workflow.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,17 @@ jobs:
8383
if: ${{ github.repository == env.UPSTREAM_REPO && github.ref == env.UPSTREAM_BRANCH }}
8484
run: docker logout
8585

86+
- name: Check for the attachment availability
87+
if: always()
88+
run: |
89+
if [ -f "./installed_packages_detailed_report.txt" ]; then
90+
echo "ATTACHMENT=installed_packages_detailed_report.txt" >> $GITHUB_ENV
91+
else
92+
echo "ATTACHMENT=" >> $GITHUB_ENV
93+
fi
94+
8695
- name: Send the email notification
87-
if: failure()
96+
if: always()
8897
uses: dawidd6/action-send-mail@v2
8998
with:
9099
# mail server settings
@@ -101,4 +110,4 @@ jobs:
101110
to: ${{ vars.EMAIL_RECIPIENTS }}
102111
# from email name
103112
from: DockHRM Automator
104-
attachments : installed_packages_detailed_report.txt
113+
attachments : ${{ env.ATTACHMENT }}

0 commit comments

Comments
 (0)