Skip to content

Invoice Box

Invoice Box #389

Workflow file for this run

name: Invoice Box
on:
schedule:
- cron: 10 0,4,8 * * *
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
environment: prod
steps:
- uses: actions/checkout@v4
- name: Set up Python
# This is the version of the action for setting up Python, not the Python version.
uses: actions/setup-python@v5
with:
# Semantic version range syntax or exact version of a Python version
python-version: "3.10"
# Optional - x64 or x86 architecture, defaults to x64
architecture: "x64"
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run
env:
PYTHONIOENCODING: utf-8
IMAP_URL: ${{secrets.IMAP_URL}}
SMTP_URL: ${{secrets.SMTP_URL}}
EMAIL_USER: ${{secrets.EMAIL_USER}}
EMAIL_PASS: ${{secrets.EMAIL_PASS}}
run: |
python src/app.py
- name: Keep Running
run: |
git config --local user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
git config --local user.name "${{ github.actor }}"
git remote set-url origin https://${{ github.actor }}:${{ github.token }}@github.com/${{ github.repository }}
git pull --rebase --autostash
git commit --allow-empty -m "Keep Running..."
git push
- name: Delete old workflow run
uses: Mattraks/delete-workflow-runs@main
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 0
keep_minimum_runs: 50