Skip to content

Commit be33015

Browse files
chore(ci): add dormant push-email notification workflow (#39)
Backfills the dormant push-email workflow (gated by vars.PUSH_EMAIL_ENABLED; needs org SMTP secrets to send). Inherited by new repos from rsr-template-repo; this places it on an existing repo. No effect until armed. <!-- SPDX-License-Identifier: CC-BY-SA-4.0 Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> --> ## Summary <!-- Briefly describe what this PR does and why. Link to related issues with "Closes #N". --> ## Changes <!-- List the key changes introduced by this PR. --> - ## RSR Quality Checklist <!-- Check all that apply. PRs that fail required checks will not be merged. --> ### Required - [ ] Tests pass (`just test` or equivalent) - [ ] Code is formatted (`just fmt` or equivalent) - [ ] Linter is clean (no new warnings or errors) - [ ] No banned language patterns (no TypeScript, no npm/bun, no Go/Python) - [ ] No `unsafe` blocks without `// SAFETY:` comments - [ ] No banned functions (`believe_me`, `unsafeCoerce`, `Obj.magic`, `Admitted`, `sorry`) - [ ] SPDX license headers present on all new/modified source files - [ ] No secrets, credentials, or `.env` files included ### As Applicable - [ ] `.machine_readable/6a2/STATE.a2ml` updated (if project state changed) - [ ] `.machine_readable/6a2/ECOSYSTEM.a2ml` updated (if integrations changed) - [ ] `.machine_readable/6a2/META.a2ml` updated (if architectural decisions changed) - [ ] Documentation updated for user-facing changes - [ ] `TOPOLOGY.md` updated (if architecture changed) - [ ] `CHANGELOG` or release notes updated - [ ] New dependencies reviewed for license compatibility (MPL-2.0 / MPL-2.0) - [ ] ABI/FFI changes validated (`src/interface/abi/` and `src/interface/ffi/` consistent) ## Testing <!-- Describe how you tested these changes. --> ## Screenshots <!-- If applicable, add screenshots or terminal output demonstrating the change. --> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 43e8559 commit be33015

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)