Update build.yml
This commit is contained in:
21
.github/workflows/build.yml
vendored
21
.github/workflows/build.yml
vendored
@@ -35,7 +35,7 @@ jobs:
|
|||||||
|
|
||||||
# Setup Bun
|
# Setup Bun
|
||||||
- name: Setup Bun
|
- name: Setup Bun
|
||||||
uses: oven-sh/setup-bun@v1
|
uses: oven-sh/setup-bun@v2
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
@@ -69,6 +69,12 @@ jobs:
|
|||||||
-L "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/logs" \
|
-L "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/logs" \
|
||||||
-o logs.zip
|
-o logs.zip
|
||||||
|
|
||||||
|
# Extract only important logs
|
||||||
|
- name: Extract important logs
|
||||||
|
run: |
|
||||||
|
unzip logs.zip -d logs
|
||||||
|
grep -E "error|warning" logs/*.txt > important_logs.txt
|
||||||
|
|
||||||
# Send email with GitHub Actions logs
|
# Send email with GitHub Actions logs
|
||||||
- name: Send email with logs
|
- name: Send email with logs
|
||||||
uses: dawidd6/action-send-mail@v3
|
uses: dawidd6/action-send-mail@v3
|
||||||
@@ -80,8 +86,13 @@ jobs:
|
|||||||
subject: "GitHub Actions Logs"
|
subject: "GitHub Actions Logs"
|
||||||
body: |
|
body: |
|
||||||
The deployment process has completed successfully.
|
The deployment process has completed successfully.
|
||||||
Please find the attached GitHub Actions logs.
|
|
||||||
to: kurosakiblackangel@gmail.com
|
Repository: ${{ github.repository }}
|
||||||
from: bip.production.js@gmail.com
|
Branch: ${{ github.ref }}
|
||||||
|
Commit: ${{ github.sha }}
|
||||||
|
|
||||||
|
Please find the attached important logs for more details.
|
||||||
|
to: recipient-email@example.com
|
||||||
|
from: your-email@gmail.com
|
||||||
attachments: |
|
attachments: |
|
||||||
${{ github.workspace }}/logs.zip
|
${{ github.workspace }}/important_logs.txt
|
||||||
|
|||||||
Reference in New Issue
Block a user