Update build.yml
This commit is contained in:
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
@@ -61,20 +61,6 @@ jobs:
|
|||||||
- name: Build project
|
- name: Build project
|
||||||
run: bun run build
|
run: bun run build
|
||||||
|
|
||||||
# Download GitHub Actions logs
|
|
||||||
- name: Download GitHub Actions logs
|
|
||||||
run: |
|
|
||||||
mkdir -p logs
|
|
||||||
curl -H "Authorization: token ${{ secrets.WIBU_GITHUB_TOKEN }}" \
|
|
||||||
-L "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/logs" \
|
|
||||||
-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
|
||||||
@@ -91,8 +77,7 @@ jobs:
|
|||||||
Branch: ${{ github.ref }}
|
Branch: ${{ github.ref }}
|
||||||
Commit: ${{ github.sha }}
|
Commit: ${{ github.sha }}
|
||||||
|
|
||||||
Please find the attached important logs for more details.
|
Please find the logs for this run at the following link:
|
||||||
|
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||||
to: recipient-email@example.com
|
to: recipient-email@example.com
|
||||||
from: your-email@gmail.com
|
from: your-email@gmail.com
|
||||||
attachments: |
|
|
||||||
${{ github.workspace }}/important_logs.txt
|
|
||||||
|
|||||||
Reference in New Issue
Block a user