chore(deps): update pytest requirement from >=7.4.0 to >=9.1.0 #5
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # CTO Watchdog — Report Mailer v1.1.0 | ||
|
Check failure on line 1 in .github/workflows/report-mailer.yml
|
||
| # Sends audit reports via email on workflow completion | ||
| # Part of: cto-watchdog — Dhaher Labs | ||
| # Author: Mulky Malikul Dhaher | ||
| name: CTO Report — Email Notification | ||
| on: | ||
| workflow_run: | ||
| workflows: ['CTO Watch — Event Monitor', 'CTO Audit — Weekly Comprehensive'] | ||
| types: [completed] | ||
| workflow_dispatch: | ||
| inputs: | ||
| recipient: | ||
| description: 'Email recipient' | ||
| required: false | ||
| default: 'dhaher-labs@email.com' | ||
| subject: | ||
| description: 'Email subject' | ||
| required: false | ||
| default: 'CTO Watchdog Report' | ||
| permissions: | ||
| contents: read | ||
| actions: read | ||
| env: | ||
| CTO_WATCHDOG_VERSION: '1.1.0' | ||
| jobs: | ||
| send-report: | ||
| name: Send Email Report | ||
| runs-on: ubuntu-latest | ||
| if: always() | ||
| steps: | ||
| - name: Download audit artifacts | ||
| uses: actions/download-artifact@v4 | ||
| continue-on-error: true | ||
| - name: Prepare report | ||
| id: prepare | ||
| run: | | ||
| # Determine recipient based on repository owner | ||
| OWNER="${{ github.event.repository.owner.login || 'dhaher-labs' }}" | ||
| if [ "$OWNER" = "mulkymalikuldhaher" ]; then | ||
| echo "recipient=mulkymalikuldhr@mail.com" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "recipient=dhaher-labs@email.com" >> $GITHUB_OUTPUT | ||
| fi | ||
| # Prepare subject | ||
| WORKFLOW="${{ github.event.workflow_run.name || 'CTO Watchdog' }}" | ||
| CONCLUSION="${{ github.event.workflow_run.conclusion || 'completed' }}" | ||
| # Add emoji for conclusion status | ||
| if [ "$CONCLUSION" = "success" ]; then | ||
| STATUS="✅ SUCCESS" | ||
| elif [ "$CONCLUSION" = "failure" ]; then | ||
| STATUS="❌ FAILED" | ||
| else | ||
| STATUS="ℹ️ $CONCLUSION" | ||
| fi | ||
| echo "subject=[CTO-Watchdog] $STATUS — $WORKFLOW" >> $GITHUB_OUTPUT | ||
| # Build report body | ||
| echo "report_body<<EOF" >> $GITHUB_OUTPUT | ||
| echo "CTO Watchdog Automated Report" >> $GITHUB_OUTPUT | ||
| echo "" >> $GITHUB_OUTPUT | ||
| echo "Workflow: $WORKFLOW" >> $GITHUB_OUTPUT | ||
| echo "Status: $STATUS" >> $GITHUB_OUTPUT | ||
| echo "Repository: ${{ github.repository }}" >> $GITHUB_OUTPUT | ||
| echo "Trigger: ${{ github.event_name }}" >> $GITHUB_OUTPUT | ||
| echo "Run: ${{ github.event.workflow_run.html_url || github.server_url }}/${{ github.repository }}/actions" >> $GITHUB_OUTPUT | ||
| echo "" >> $GITHUB_OUTPUT | ||
| echo "This is an automated notification from CTO Watchdog v1.1.0." >> $GITHUB_OUTPUT | ||
| echo "---" >> $GITHUB_OUTPUT | ||
| echo "Dhaher Labs — Building Intelligent Systems" >> $GITHUB_OUTPUT | ||
| echo "EOF" >> $GITHUB_OUTPUT | ||
| - name: Send email | ||
| if: ${{ secrets.CTO_WATCHDOG_SMTP_SERVER }} | ||
| uses: dawidd6/action-send-mail@v3 | ||
| with: | ||
| server_address: ${{ secrets.CTO_WATCHDOG_SMTP_SERVER }} | ||
| server_port: ${{ secrets.CTO_WATCHDOG_SMTP_PORT }} | ||
| username: ${{ secrets.CTO_WATCHDOG_SMTP_USER }} | ||
| password: ${{ secrets.CTO_WATCHDOG_SMTP_PASS }} | ||
| from: ${{ secrets.CTO_WATCHDOG_SMTP_FROM }} | ||
| to: ${{ steps.prepare.outputs.recipient }} | ||
| subject: ${{ steps.prepare.outputs.subject }} | ||
| body: ${{ steps.prepare.outputs.report_body }} | ||
| - name: Log notification | ||
| run: | | ||
| echo "📧 Notification sent to: ${{ steps.prepare.outputs.recipient }}" | ||
| echo "📋 Subject: ${{ steps.prepare.outputs.subject }}" | ||