Skip to content

Add event reminder workflows #1

Add event reminder workflows

Add event reminder workflows #1

jobs:

Check failure on line 1 in .github/workflows/reminder_Pumpkin Carving.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/reminder_Pumpkin Carving.yml

Invalid workflow file

invalid `cron` attribute "2024-10-29T14:00:00Z"
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: Install dependencies
run: pip install smtplib email
- name: Send email
run: "python - <<EOF\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 = \"Pumpkin Carving Reminder\"\
\n\nmsg = MIMEMultipart()\nmsg['From'] = sender_email\nmsg['To'] = receiver_email\n\
msg['Cc'] = cc_email\nmsg['Subject'] = subject\n\nbody = \"\"\"Hi Michelle,\n\
\nCould you please send out the announcement below to the department?\n\n\
Thanks very much!\n\nBest,\nThe PBS Social Committee\n\n===BEGIN===\nPBS Social\
\ Committee Calendar of Events\n\nPumpkin Carving \U0001F383\U0001F47B\U0001F9DF\
\U0001F9DA\U0001F9B8\n\nGet into the Halloween spirit with our Pumpkin Carving\
\ event. All materials provided. Open to all in the PBS community.\n\n**Date:**\
\ Wednesday, October 30\n**Time:** TBD\n**Location:** TBD\n\nLet's get creative!\n\
\nBest,\nThe PBS Social Committee\n\n\n===END===\n\"\"\"\nmsg.attach(MIMEText(body,\
\ 'plain'))\n\nserver = smtplib.SMTP('smtp.gmail.com', 587)\nserver.starttls()\n\
server.login(sender_email, \"eswl nrrh khqw aoex\")\ntext = msg.as_string()\n\
server.sendmail(sender_email, receiver_email.split(\", \") + cc_email.split(\"\
, \"), text)\nserver.quit()\n\nEOF"
name: Reminder for Pumpkin Carving
'on':
schedule:
- cron: '2024-10-29T14:00:00Z'