-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (53 loc) · 1.92 KB
/
main.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
51
52
53
54
55
56
57
58
59
# This is a basic workflow to help you get started with Actions
name: Checkin
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "dev" ]
# pull_request:
# branches: [ "main" ]
schedule:
# UTC (国内 UTC+8)
- cron: '01 4 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
Checkin:
runs-on: ubuntu-latest
# 超时设置
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python version
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies
- name: Setup Environment
run: |
pip install --upgrade pip
pip install git+https://github.com/openai/whisper.git
pip install Pillow pyscreenshot
pip install -r ./requirements.txt
- name: Delete old workflow runs
uses: MajorScruffy/[email protected]
with:
repository: ${{ github.repository }} # replace this with your own repository such as >> owner/repo
older-than-seconds: 86400 # remove all workflow runs older than 1 day >> 24*60*60=86400
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup FFmpeg using versions
uses: Iamshankhadeep/[email protected]
with:
# Not strictly necessary, but it may prevent rate limit
# errors especially on GitHub-hosted macos machines.
token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkin
env:
URL_USER_PASSWD: ${{ secrets.URL_USER_PASSWD }}
BARK_TOKEN: ${{ secrets.BARK_TOKEN }}
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
TG_USER_ID: ${{ secrets.TG_USER_ID }}
run: |
xvfb-run python3 ./main.py