Skip to content

schedule

schedule #995

Workflow file for this run

name: schedule
on:
workflow_dispatch:
inputs:
cookie:
description: '知乎cookie'
required: true
parseAnswer:
description: '是否爬取话题下回答'
required: false
default: "false"
schedule:
# 每天12点更新 按照UTC时间计算
- cron: "0 4 * * *"
jobs:
build:
runs-on: ubuntu-latest
env:
TZ: Asia/Shanghai
COOKIE: ${{github.event.inputs.cookie}}
ANSWER_FLAG: ${{github.event.inputs.parseAnswer}}
steps:
- name: 克隆项目
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: 执行构建
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.4.2
arguments: build -x test
- name: 运行程序
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.4.2
arguments: run
- name: 提交数据
uses: EndBug/add-and-commit@v9
with:
message: update by github action
committer_name: zhaoweilong
committer_email: [email protected]