scheduled run main.py #98
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: scheduled run main.py | |
on: | |
schedule: | |
- cron: '0 0 * * 2,4' # At 8AM for GMT+8, 12AM for UTC, every Tue and Thu | |
env: | |
EMAIL: ${{ secrets.EMAIL }} | |
APP_PASS: ${{ secrets.APP_PASS }} | |
AMAZON_S3_BUCKET_NAME: ${{ secrets.AMAZON_S3_BUCKET_NAME }} | |
AMAZON_S3_BUCKET_SUBFOLDER: ${{ secrets.AMAZON_S3_BUCKET_SUBFOLDER }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
REGION: ${{ secrets.REGION }} | |
EMAIL_RECIPIENTS: ${{ secrets.EMAIL_RECIPIENTS }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo content | |
uses: actions/checkout@v2 | |
- name: setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: install python packages | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip freeze | |
- name: execute py script | |
run: python main.py |