Skip to content

Commit b38ee83

Browse files
authored
Github Actions优化:使用tar压缩文件来加快上传 (#7)
1 parent 2e29d53 commit b38ee83

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/action_workflow.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ jobs:
3636
- name: 压缩下载的漫画
3737
run: |
3838
cd /home/runner/work/jmcomic/download/
39-
zip -r ./下载完成的本子.zip ./*
39+
tar -zcvf ../下载完成的本子.tar.gz ./
4040
4141
- name: 上传结果
4242
uses: actions/upload-artifact@v3
4343
with:
4444
# Artifact name
4545
name: 下载完成的本子
4646
# A file, directory or wildcard pattern that describes what to upload
47-
path: /home/runner/work/jmcomic/download/下载完成的本子.zip
47+
path: /home/runner/work/jmcomic/下载完成的本子.tar.gz
4848
# The desired behavior if no files are found using the provided path.
4949
if-no-files-found: warn
5050
# Duration after which artifact will expire in days. 0 means using default retention.Minimum 1 day. Maximum 90 days unless changed from the repository settings page.

.github/workflows/action_workflow_local.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ jobs:
4343
- name: 压缩下载的漫画
4444
run: |
4545
cd /home/runner/work/jmcomic/download/
46-
zip -r ./下载完成的本子.zip ./*
46+
tar -zcvf ../下载完成的本子.tar.gz ./
4747
4848
- name: 上传结果
4949
uses: actions/upload-artifact@v3
5050
with:
5151
# Artifact name
5252
name: 下载完成的本子
5353
# A file, directory or wildcard pattern that describes what to upload
54-
path: /home/runner/work/jmcomic/download/下载完成的本子.zip
54+
path: /home/runner/work/jmcomic/下载完成的本子.tar.gz
5555
# The desired behavior if no files are found using the provided path.
5656
if-no-files-found: warn
5757
# Duration after which artifact will expire in days. 0 means using default retention.Minimum 1 day. Maximum 90 days unless changed from the repository settings page.

0 commit comments

Comments
 (0)