SGB Advisor #125
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: SGB Advisor | |
permissions: | |
contents: read | |
on: | |
schedule: | |
- cron: "30 5 * * 1-5" | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- "Dockerfile" | |
- ".github/workflows/create-docker-image.yaml" | |
- ".dockerignore" | |
workflow_dispatch: | |
jobs: | |
run-sgb-advisor: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Setup python and pip | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.13" | |
cache: "pip" # caching pip dependencies | |
- name: Install requirements | |
run: | | |
pip install -r requirements.txt | |
- name: Get playwright cache | |
uses: actions/cache@v4 | |
id: playwright-cache | |
with: | |
path: | | |
~/.cache/ms-playwright | |
key: ${{ runner.os }}-${{ runner.arch }}-${{ github.sha }}-playwright | |
- name: Setup and install playwright | |
run: | | |
playwright install --with-deps firefox | |
- name: Run the script | |
env: | |
SGB_AWS_ACCESS_KEY: ${{ secrets.SGB_AWS_ACCESS_KEY }} | |
SGB_AWS_SECRET_ACCESS_KEY: ${{ secrets.SGB_AWS_SECRET_ACCESS_KEY }} | |
SGB_AWS_SES_RECIPIENT: ${{ secrets.SGB_AWS_SES_RECIPIENT }} | |
SGB_AWS_SES_SENDER_EMAIL: ${{ secrets.SGB_AWS_SES_SENDER_EMAIL }} | |
SGB_TELEGRAM_BOT_TOKEN: ${{ secrets.SGB_TELEGRAM_BOT_TOKEN }} | |
SGB_TELEGRAM_CHAT_IDS: ${{ secrets.SGB_TELEGRAM_CHAT_IDS }} | |
SGB_AWS_REGION: ${{ vars.SGB_AWS_REGION }} | |
SGB_MODE: ${{ vars.SGB_MODE }} | |
SGB_LOG_LEVEL: ${{ vars.SGB_LOG_LEVEL }} | |
run: python3 app.py |