Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Class Followup Automation #181

Class Followup Automation

Class Followup Automation #181

name: Class Followup Automation
on:
workflow_dispatch:
schedule:
- cron: '0 18 * * 1-5' # runs every weekday at 12pm CST
jobs:
my_job:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
token: ${{ secrets.GH_PAT }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Set up Git user
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
- name: Set up cache for pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run script
run: python main.py
env:
API_KEY: ${{ secrets.API_KEY }}
DISCOUNT_CODE: ${{ secrets.DISCOUNT_CODE }}
- name: Commit and push log file
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git add rmm_email_automation.log
git commit -m "Update log file"
git push