Skip to content

Commit 391933d

Browse files
committed
清理项目结构并完善多平台Docker构建
1 parent 182f1d6 commit 391933d

File tree

7 files changed

+37
-1221
lines changed

7 files changed

+37
-1221
lines changed

.github/workflows/docker-build.yml

Lines changed: 19 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,37 @@
1-
name: Build and Push Multi-Platform Docker Image
1+
name: Multi-arch Docker Build
22

33
on:
44
push:
5-
branches:
6-
- main
7-
- opt
8-
tags:
9-
- "v*"
5+
branches: ["opt"]
106
pull_request:
11-
branches:
12-
- main
7+
branches: ["opt"]
138

149
jobs:
15-
build-and-push:
10+
build:
1611
runs-on: ubuntu-latest
17-
permissions:
18-
contents: write
19-
packages: write
2012

2113
steps:
22-
- name: Checkout code
23-
uses: actions/checkout@v4
14+
- uses: actions/checkout@v3
15+
16+
- name: Login to Docker Hub
17+
uses: docker/login-action@v2
2418
with:
25-
fetch-depth: 0
26-
token: ${{ secrets.GITHUB_TOKEN }}
19+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
20+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
2721

2822
- name: Set up QEMU
29-
uses: docker/setup-qemu-action@v3
23+
uses: docker/setup-qemu-action@v2
3024

3125
- name: Set up Docker Buildx
32-
uses: docker/setup-buildx-action@v3
33-
with:
34-
platforms: linux/amd64,linux/arm64
35-
36-
- name: Cache Docker layers
37-
uses: actions/cache@v3
38-
with:
39-
path: /tmp/.buildx-cache
40-
key: ${{ runner.os }}-buildx-${{ github.sha }}
41-
restore-keys: |
42-
${{ runner.os }}-buildx-
43-
44-
- name: Log in to Docker Hub
45-
uses: docker/login-action@v3
46-
with:
47-
username: ${{ secrets.DOCKER_USERNAME }}
48-
password: ${{ secrets.DOCKER_TOKEN }}
49-
50-
- name: Extract metadata
51-
id: meta
52-
uses: docker/metadata-action@v5
53-
with:
54-
images: ${{ secrets.DOCKER_USERNAME }}/bili-audio-downloader
55-
tags: |
56-
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
57-
type=raw,value=opt,enable=${{ github.ref == 'refs/heads/opt' }}
26+
uses: docker/setup-buildx-action@v2
5827

59-
- name: Build and push multi-platform Docker image
60-
uses: docker/build-push-action@v5
28+
- name: Build and push
29+
uses: docker/build-push-action@v4
6130
with:
6231
context: .
63-
file: docker/Dockerfile
32+
file: ./docker/Dockerfile
6433
platforms: linux/amd64,linux/arm64
65-
push: ${{ github.event_name != 'pull_request' }}
66-
tags: ${{ steps.meta.outputs.tags }}
67-
labels: |
68-
org.opencontainers.image.revision=${{ github.sha }}
69-
cache-from: type=local,src=/tmp/.buildx-cache
70-
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
71-
72-
- name: Move cache
73-
run: |
74-
rm -rf /tmp/.buildx-cache
75-
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
34+
push: true
35+
tags: |
36+
${{ secrets.DOCKER_HUB_USERNAME }}/bili-audio-downloader:latest
37+
${{ secrets.DOCKER_HUB_USERNAME }}/bili-audio-downloader:${{ github.sha }}

audiobooks/测试/【多人有声剧】沉睡的森林 p03 沉睡的森林-21_30.info.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

download_history/history.json

Lines changed: 18 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,24 @@
11
{
2-
"6b08f7a7cb4835c7cdeaa04d4f01ee40": {
3-
"bvid": "BV1eHc8ePESE",
2+
"6e8926fa2c562eff0bfeb551d44741c7": {
3+
"bvid": "BV1e8zCYSEHJ",
44
"p": 1,
5-
"title": "国库不空,誓不成佛! 如何让一个封建王朝财政崩溃?【穿越指南·赚】",
6-
"file_path": "audiobooks\\test\\国库不空,誓不成佛! 如何让一个封建王朝财政崩溃?【穿越指南·赚】.mp3",
7-
"download_time": "2025-01-18T12:49:09.606611",
8-
"file_size": 29988191,
9-
"duration": 1245.311,
10-
"uploader": "庸半史",
11-
"upload_date": "20250115"
5+
"title": "奇案柳叶刀——节目预告",
6+
"file_path": "audiobooks\\奇案柳叶刀\\奇案柳叶刀——节目预告.mp3",
7+
"download_time": "2025-01-19T15:22:39.047433",
8+
"file_size": 175747,
9+
"duration": 5.022,
10+
"uploader": "张永泉讲医疗安全",
11+
"upload_date": "20241203"
1212
},
13-
"f5590914f5ac439878c646b8621d5a89": {
14-
"bvid": "BV1op4y157tu",
13+
"407a756ee7aba7050d57a475d868e9ca": {
14+
"bvid": "BV1KmzCYMEaq",
1515
"p": 1,
16-
"title": "如何织造一场文字狱?【穿越指南·罪】",
17-
"file_path": "audiobooks\\test\\test-1.mp3",
18-
"download_time": "2025-01-18T12:50:31.776440",
19-
"file_size": 18402263,
20-
"duration": 763.135,
21-
"uploader": "庸半史",
22-
"upload_date": "20230728"
23-
},
24-
"3576b8309fda29eafbe82762c8e30e30": {
25-
"bvid": "BV1ojcReCEyY",
26-
"p": 1,
27-
"title": "第一次练枪(热风枪拆卸芯片和植锡)",
28-
"file_path": "audiobooks\\test\\第一次练枪(热风枪拆卸芯片和植锡).mp3",
29-
"download_time": "2025-01-18T13:00:16.882375",
30-
"file_size": 5406313,
31-
"duration": 222.725,
32-
"uploader": "是我_是我_就是我",
33-
"upload_date": "20250118"
34-
},
35-
"cb6d21829fbcfbb74e6eceadf8144818": {
36-
"bvid": "BV1VLczeFEZW",
37-
"p": 1,
38-
"title": "40分钟读懂:秦始皇灭六国前夜,秦国高层的权力斗争有多激烈?",
39-
"file_path": "audiobooks\\test\\40分钟读懂:秦始皇灭六国前夜,秦国高层的权力斗争有多激烈?.mp3",
40-
"download_time": "2025-01-18T14:25:06.403465",
41-
"file_size": 62443744,
42-
"duration": 2596.135,
43-
"uploader": "朕要做太子",
44-
"upload_date": "20250115"
45-
},
46-
"1803b82882639f06949d9f28d00fe060": {
47-
"bvid": "BV1yhc2ewEFe",
48-
"p": 1,
49-
"title": "站着不动都能进球?!阿尔瓦雷斯破门致胜!马竞8连胜登顶西甲!",
50-
"file_path": "audiobooks\\test\\站着不动都能进球?!阿尔瓦雷斯破门致胜!马竞8连胜登顶西甲!.mp3",
51-
"download_time": "2025-01-18T16:32:14.721349",
52-
"file_size": 4589065,
53-
"duration": 187.653,
54-
"uploader": "司马尘",
55-
"upload_date": "20250113"
56-
},
57-
"a6c90a7ce069c7b80812daabcaf605c0": {
58-
"bvid": "BV1xxUpYNEVd",
59-
"p": 1,
60-
"title": "【多人有声剧】沉睡的森林 p01 沉睡的森林-01_10",
61-
"file_path": "audiobooks\\测试\\【多人有声剧】沉睡的森林 p01 沉睡的森林-01_10.mp3",
62-
"download_time": "2025-01-19T10:09:54.573457",
63-
"file_size": 139085326,
64-
"duration": 5789.082,
65-
"uploader": "失算的谋士",
66-
"upload_date": "20241118"
67-
},
68-
"dd06e09e9aaf7b146ddfb924fd41b693": {
69-
"bvid": "BV1xxUpYNEVd",
70-
"p": 2,
71-
"title": "【多人有声剧】沉睡的森林 p02 沉睡的森林-11_20",
72-
"file_path": "audiobooks\\测试\\【多人有声剧】沉睡的森林 p02 沉睡的森林-11_20.mp3",
73-
"download_time": "2025-01-19T10:11:50.108137",
74-
"file_size": 133238923,
75-
"duration": 5545.06,
76-
"uploader": "失算的谋士",
77-
"upload_date": "20241118"
16+
"title": "1.东方快车谋杀案:谁是凶手?谁不是凶手?",
17+
"file_path": "audiobooks\\奇案柳叶刀\\1.东方快车谋杀案:谁是凶手?谁不是凶手?.mp3",
18+
"download_time": "2025-01-19T15:24:36.026923",
19+
"file_size": 67252070,
20+
"duration": 2796.982,
21+
"uploader": "张永泉讲医疗安全",
22+
"upload_date": "20241203"
7823
}
7924
}

0 commit comments

Comments
 (0)