mirror of
https://github.com/hect0x7/JMComic-Crawler-Python.git
synced 2025-11-04 14:49:43 +08:00
Github Actions下载工作流优化 (#4)
This commit is contained in:
parent
e852db3d59
commit
5a370e36cf
10
.github/workflows/action_workflow.yml
vendored
10
.github/workflows/action_workflow.yml
vendored
@ -4,6 +4,7 @@ on:
|
||||
push:
|
||||
branches: [ "workflow" ]
|
||||
paths:
|
||||
- '.github/workflows/*.yml' # 工作流定义
|
||||
- 'usage/**/*.py' # 工作流脚本
|
||||
- 'assets/config/*.yml' # 工作流配置
|
||||
pull_request:
|
||||
@ -17,10 +18,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python 3.10
|
||||
- name: Set up Python 3.11
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: "3.10"
|
||||
python-version: "3.11"
|
||||
|
||||
- name: 安装依赖项
|
||||
run: |
|
||||
@ -34,13 +35,14 @@ jobs:
|
||||
|
||||
- name: 压缩下载的漫画
|
||||
run: |
|
||||
zip -r /home/runner/work/jmcomic/download/下载完成的本子.zip /home/runner/work/jmcomic/download/*
|
||||
cd /home/runner/work/jmcomic/download/
|
||||
zip -r ./下载完成的本子.zip ./*
|
||||
|
||||
- name: 上传结果
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
# Artifact name
|
||||
name: 下载完成的本子.zip
|
||||
name: 下载完成的本子
|
||||
# A file, directory or wildcard pattern that describes what to upload
|
||||
path: /home/runner/work/jmcomic/download/下载完成的本子.zip
|
||||
# The desired behavior if no files are found using the provided path.
|
||||
|
||||
13
.github/workflows/action_workflow_local.yml
vendored
13
.github/workflows/action_workflow_local.yml
vendored
@ -8,9 +8,11 @@ on:
|
||||
push:
|
||||
branches: [ "workflow_local" ]
|
||||
paths:
|
||||
- 'src/**/*.py' # 源码
|
||||
- '.github/workflows/*.yml' # 工作流定义
|
||||
- 'usage/**/*.py' # 工作流脚本
|
||||
- 'assets/config/*.yml' # 工作流配置
|
||||
- 'src/**/*.py' # 源码
|
||||
|
||||
pull_request:
|
||||
branches: [ "workflow_local" ]
|
||||
|
||||
@ -22,10 +24,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python 3.10
|
||||
- name: Set up Python 3.11
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: "3.10"
|
||||
python-version: "3.11"
|
||||
|
||||
- name: 安装依赖项
|
||||
run: |
|
||||
@ -40,13 +42,14 @@ jobs:
|
||||
|
||||
- name: 压缩下载的漫画
|
||||
run: |
|
||||
zip -r /home/runner/work/jmcomic/download/下载完成的本子.zip /home/runner/work/jmcomic/download/*
|
||||
cd /home/runner/work/jmcomic/download/
|
||||
zip -r ./下载完成的本子.zip ./*
|
||||
|
||||
- name: 上传结果
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
# Artifact name
|
||||
name: 下载完成的本子.zip
|
||||
name: 下载完成的本子
|
||||
# A file, directory or wildcard pattern that describes what to upload
|
||||
path: /home/runner/work/jmcomic/download/下载完成的本子.zip
|
||||
# The desired behavior if no files are found using the provided path.
|
||||
|
||||
@ -6,8 +6,8 @@ dir_tree: !!python/object:jmcomic.jm_option.DownloadDirTree
|
||||
disable_jm_module_debug: false
|
||||
download_convert_image_suffix: null
|
||||
download_image_then_decode: true
|
||||
download_multi_thread_photo_batch_count: 10 # 一次多线程批量下载的数量,太多了禁漫服务器可能顶不住
|
||||
download_multi_thread_photo_len_limit: 30
|
||||
download_multi_thread_photo_batch_count: 15 # 一次多线程批量下载的数量,太多了禁漫服务器可能顶不住
|
||||
download_multi_thread_photo_len_limit: 35
|
||||
download_use_disk_cache: true
|
||||
|
||||
client_config:
|
||||
|
||||
@ -11,6 +11,7 @@ jm_albums = str_to_list('''
|
||||
422866
|
||||
|
||||
|
||||
|
||||
''')
|
||||
|
||||
# 调用jmcomic的download_album方法,下载漫画
|
||||
|
||||
Loading…
Reference in New Issue
Block a user