Skip to content

Commit 67eaa56

Browse files
chore(ci): add dormant push-email notification workflow (#37)
Backfills the dormant push-email workflow (gated by `vars.PUSH_EMAIL_ENABLED`; sending needs org SMTP secrets). Inherited by new repos from the template — this places it on this existing repo. **No effect until armed.** Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 056af44 commit 67eaa56

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# Dormant push-email notification. ARMED by setting the repo variable
3+
# PUSH_EMAIL_ENABLED=true (the single on/off switch). Addresses are pre-filled;
4+
# sending needs the org SMTP secrets (SMTP_HOST/PORT/USER/PASS). Inherited by
5+
# new repos from the template; placed on existing repos by the farm sweep.
6+
name: Push email notification
7+
on:
8+
push: {}
9+
permissions:
10+
contents: read
11+
jobs:
12+
notify:
13+
name: Email on push
14+
if: ${{ vars.PUSH_EMAIL_ENABLED == 'true' }}
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Send push notification email
18+
uses: dawidd6/action-send-mail@6e502825a508b867ab2954ad6343b68787624c01 # pinned
19+
with:
20+
server_address: ${{ secrets.SMTP_HOST }}
21+
server_port: ${{ secrets.SMTP_PORT }}
22+
secure: true
23+
username: ${{ secrets.SMTP_USER }}
24+
password: ${{ secrets.SMTP_PASS }}
25+
from: "GitHub Push <${{ secrets.SMTP_USER }}>"
26+
to: "jonathan.jewell@gmail.com j.d.a.jewell@open.ac.uk"
27+
subject: "[${{ github.repository }}] push to ${{ github.ref_name }} by ${{ github.actor }}"
28+
body: |
29+
Repository: ${{ github.repository }}
30+
Branch: ${{ github.ref_name }}
31+
Pusher: ${{ github.actor }}
32+
Compare: ${{ github.event.compare }}
33+
Head msg: ${{ github.event.head_commit.message }}

0 commit comments

Comments
 (0)