Skip to content

Update main.yml

Update main.yml #6

Workflow file for this run

name: Send Email on Commit
on:
push:
branches:
- '**'
jobs:
send-email:
runs-on: ubuntu-latest
steps:
- name: Send Email
uses: dawidd6/action-send-mail@v2
with:
server_address: smtp.gmail.com
server_port: 587
username: ${{ secrets.EMAIL_USERNAME }}
password: ${{ secrets.EMAIL_PASSWORD }}
subject: Commit Notification
to: ${{ secrets.EMAIL_TO }}
from: ${{ secrets.EMAIL_USERNAME }}
body: |
A new commit has been made to the repository on branch ${{ github.ref }}.
Commit message: ${{ github.event.head_commit.message }}
Committer: ${{ github.event.head_commit.committer.name }}
Commit URL: ${{ github.event.head_commit.url }}