Weekly Balance Report #12
This file contains hidden or 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: Weekly Balance Report | |
| on: | |
| schedule: | |
| # Каждую субботу в 9:00 UTC (изменить на '0 4 * * 6' для 9:00 EST, если нужно) | |
| - cron: '0 7 * * 6' | |
| workflow_dispatch: # Позволяет запустить вручную из UI GitHub | |
| jobs: | |
| run-report: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' # Или твоя версия Python | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Lint code (optional check) | |
| run: | | |
| pip install flake8 | |
| flake8 script.py # Добавь, если хочешь проверку стиля кода | |
| - name: Run script | |
| run: python script.py | |
| - name: Upload logs (if failed) — fixed path | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: error-logs | |
| path: | | |
| $GITHUB_WORKSPACE/*.log # Только локальные логи в repo, без /tmp | |
| if-no-files-found: ignore # Игнорировать, если файлов нет |