-
Notifications
You must be signed in to change notification settings - Fork 311
49 lines (49 loc) · 1.31 KB
/
release.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
43
44
45
46
47
48
49
name: TV爬虫发布
on:
push:
tags:
- pyV[0-9]+.*
jobs:
build:
name: TV爬虫发布
runs-on: ubuntu-latest # 如果是镜像中启动无法获取git信息
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest" ] #, "macos-latest", "windows-latest"
steps:
- name: 下载代码
uses: actions/checkout@v3
with:
repository: jadehh/TV
ref: py
fetch-depth: 0 # 显示所有提交的日志
token: ${{ secrets.GH_PAT }}
- name: 安装pip环境
run: |
pip install -r requirements.txt
- name: 执行爬虫脚本
run: |
python main.py
- name: 上传配置json文件
run: |
git config --global user.email "jadehh@live.com"
git config --global user.name "jade"
ls -l
git add config.json
commit_msg="* 更新配置文件"
git commit -a -m "$commit_msg"
- name: 查看当前分支信息
run: |
ls -l
- name: 上传分支
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GH_PAT }}
repository: jadehh/TV
directory: .
branch: py
force: true
tags: true
env:
GITHUB_ACTOR: jadehh