-
Notifications
You must be signed in to change notification settings - Fork 43
42 lines (35 loc) · 1.26 KB
/
Auto.yaml
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
name: momo
# Controls when the action will run.
on:
schedule:
- cron: '0 * * * *'
# 更改执行时间/次数 具体可以百度 cron 的配置进行更改
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@master
# Set-timezone
- name: Set time zone
run: sudo timedatectl set-timezone 'Asia/Shanghai'
# Runs a single command using the runners shell
- name: 'Set up Python'
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: 'Install requirements'
run: pip install -r ./auto-momo/requirements.txt
- name: 'Working'
env:
link: ${{secrets.link}}
run: |
python -m pip install --upgrade pip
python -m pip install pytz requests datetime
python ./auto-momo/momo.py