Skip to content

Add event reminder workflows #3

Add event reminder workflows

Add event reminder workflows #3

name: Reminder for Research Extravaganza

Check failure on line 1 in .github/workflows/reminder_Research Extravaganza.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/reminder_Research Extravaganza.yml

Invalid workflow file

invalid `cron` attribute "2024-09-19T14:00:00Z"
'on':
workflow_dispatch: {}
schedule:
- cron: '2024-09-19T14:00:00Z'
jobs:
send_email:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Send email
run: "python - <<EOF\n\nimport smtplib\nfrom email.mime.multipart import MIMEMultipart\n\
from email.mime.text import MIMEText\n\nsender_email = \"[email protected]\"\
\nreceiver_email = \"[email protected]\"\ncc_email = \"[email protected],\
\ [email protected]\"\nsubject = \"Research Extravaganza Reminder\"\
\n\nmsg = MIMEMultipart(\"alternative\")\nmsg['From'] = sender_email\nmsg['To']\
\ = receiver_email\nmsg['Cc'] = cc_email\nmsg['Subject'] = subject\n\ntext\
\ = \"\"\"Hi Michelle,\n\nCould you please send out the announcement below\
\ to the department?\n\nThanks very much!\n\nBest,\nThe PBS Social Committee\n\
\n===BEGIN===\nPBS Social Committee Calendar of Events\n\nResearch Extravaganza\
\ \U0001F9D1\u200D\U0001F52C\U0001F9D1\u200D\U0001F3EB\U0001F9E0\U0001F52C\
\U0001F973\n\nJoin us for the Research Extravaganza, an exciting kickoff to\
\ the term! Meet new folks, welcome back returning members, and enjoy introductions\
\ from the community.\n\n**Date:** Friday, September 20\n**Time:** TBD\n**Location:**\
\ TBD\n\nWe look forward to seeing you there!\n\nBest,\nThe PBS Social Committee\n\
\n\n===END===\n\"\"\"\nhtml = \"\"\"<html><body><p>PBS Social Committee Calendar\
\ of Events</p>\n<p>Research Extravaganza \U0001F9D1\u200D\U0001F52C\U0001F9D1\
\u200D\U0001F3EB\U0001F9E0\U0001F52C\U0001F973</p>\n<p>Join us for the Research\
\ Extravaganza, an exciting kickoff to the term! Meet new folks, welcome back\
\ returning members, and enjoy introductions from the community.</p>\n<p><strong>Date:</strong>\
\ Friday, September 20\n<strong>Time:</strong> TBD\n<strong>Location:</strong>\
\ TBD</p>\n<p>We look forward to seeing you there!</p>\n<p>Best,\nThe PBS\
\ Social Committee</p></body></html>\"\"\"\n\npart1 = MIMEText(text, \"plain\"\
)\npart2 = MIMEText(html, \"html\")\n\nmsg.attach(part1)\nmsg.attach(part2)\n\
\nserver = smtplib.SMTP('smtp.gmail.com', 587)\nserver.starttls()\nserver.login(sender_email,\
\ \"${ secrets.GMAIL_PASSWORD }\")\ntext = msg.as_string()\nserver.sendmail(sender_email,\
\ receiver_email.split(\", \") + cc_email.split(\", \"), text)\nserver.quit()\n\
\nEOF"