File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 }}
You can’t perform that action at this time.
0 commit comments