Skip to content

run main.py

run main.py #1191

Workflow file for this run

name: run main.py
on:
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: '17 * * * *' # At 00:00 on Monday
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: Cache Python packages
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml', '**/uv.lock') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install uv
run: |
python -m pip install --upgrade pip
pip install uv
- name: Sync environment with uv
run: uv sync
- name: Execute py script
env:
LOCATION: ${{ secrets.LOCATION }}
NUMBER: ${{ secrets.NUMBER }}
PASSPORT_NUMBER: ${{ secrets.PASSPORT_NUMBER }}
SURNAME: ${{ secrets.SURNAME }}
TIMEZONE: ${{ secrets.TIMEZONE }}
FROM: ${{ secrets.FROM }}
TO: ${{ secrets.TO }}
PASSWORD: ${{ secrets.PASSWORD }}
SMTP: ${{ secrets.SMTP }}
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
TG_CHAT_ID: ${{ secrets.TG_CHAT_ID }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: uv run trigger.py
- name: Upload status artifact
uses: actions/upload-artifact@v4
with:
name: status-artifact
path: status_record.json