Skip to content

Commit

Permalink
doc: update docs/github-actions.md (#613)
Browse files Browse the repository at this point in the history
  • Loading branch information
lozhu20 committed Apr 16, 2024
1 parent 8c80f47 commit 642aa08
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/github-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,26 @@ on:
types: [published]
```

### 定时触发
可以使用 cron 表达式配置周期性任务,定时执行

```yaml
name: schedule task

# 要注意时差,最好手动指定时区
env:
TZ: Asia/Shanghai

on:
# push 到 main 分支时执行任务
push:
branches:
- main
# 每隔两小时自动执行任务
schedule:
- cron: '0 0/2 * * *'
```

### 多项任务

```yml
Expand Down

0 comments on commit 642aa08

Please sign in to comment.