-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·47 lines (35 loc) · 1.16 KB
/
Copy pathmain.yml
File metadata and controls
executable file
·47 lines (35 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Send Email On Cron Schedule
env:
SENDER_EMAIL: ${{secrets.SENDER_EMAIL}}
SENDER_EMAIL_PASS: ${{secrets.SENDER_EMAIL_PASSWORD}}
RECIPIENTS_LIST_IND: ${{secrets.RECIPIENTS_LIST_IND}}
RECIPIENTS_LIST_UK: ${{secrets.RECIPIENTS_LIST_UK}}
on:
# The Cron Schedule
schedule:
- cron: "*/30 * * * 1"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run script
run: python 'Intermediate/Day 32 - Email Sender/main.py'
- name: Push changes to Git
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'Github@action.com'
git add . || true
git status
git diff-index --quiet HEAD || (git commit -m 'Updated by GitHub Actions' && git push)