Skip to content

Daily Email

Daily Email #181

Workflow file for this run

name: Daily Email
on:
workflow_dispatch:
schedule:
# runs at 12 AM UTC (5:30 AM IST)
- cron: "0 0 * * *"
permissions: # Global permissions configuration starts here
contents: write # 'read' access to repository contents
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v4
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: setup python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests redmail
- name: Send email
env:
PASSWORD: ${{ secrets.PASSWORD }}
USEREMAIL: ${{ secrets.USEREMAIL }}
run: python main.py
- name: commit files
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -A
git diff-index --quiet HEAD || (git commit -a -m "add: Updating GitHub Follower Counting" --allow-empty)
- name: push changes
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.TOKEN }}
branch: main