-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.67 KB
/
runn.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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