Skip to content
This repository was archived by the owner on Jul 21, 2024. It is now read-only.

Commit a23bc8b

Browse files
committed
+ 接入阿里云盘OpenApi
+ 合并4个版本, 统一维护 + 支持容量显示 + 支持WebApi/OpenApi来回切换 + OpenApi/WebApi SDK + 支持网页引导登录 + 支持网页切换token(WebApi) * 修复Kodi不能显示文件大小
1 parent 2aa99b5 commit a23bc8b

File tree

178 files changed

+9176
-2625
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+9176
-2625
lines changed

.github/workflows/build-docker.yml

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ jobs:
4949
-
5050
name: Setup Gradle
5151
uses: gradle/gradle-build-action@v2
52-
- uses: actions/setup-java@v3
52+
-
53+
uses: actions/setup-java@v3
5354
with:
5455
distribution: 'temurin'
5556
java-version: '17'
@@ -67,26 +68,55 @@ jobs:
6768
run: echo "VERSION_INFORMATION=$(${{github.workspace}}/gradlew -q ciPrintVersionInformation)" >> $GITHUB_ENV
6869
-
6970
name: Build Docker Image
70-
run: docker build -t eritpchy/webdav-aliyundriver:${{ env.VERSION_INFORMATION }}-${{ matrix.target.arch }} .
71+
run: >
72+
docker buildx build --cache-from type=gha --cache-to type=gha,mode=max
73+
-t eritpchy/webdav-aliyundriver:${{ env.VERSION_INFORMATION }}-${{ matrix.target.arch }}
74+
-t eritpchy/aliyundrive-webdav:${{ env.VERSION_INFORMATION }}-${{ matrix.target.arch }} .
7175
-
72-
name: Push Docker Image
76+
name: Push Docker Image eritpchy/webdav-aliyundriver:latest(OLD)
7377
run: docker push eritpchy/webdav-aliyundriver:${{ env.VERSION_INFORMATION }}-${{ matrix.target.arch }}
78+
-
79+
name: Push Docker Image eritpchy/aliyundrive-webdav:latest
80+
run: docker push eritpchy/aliyundrive-webdav:${{ env.VERSION_INFORMATION }}-${{ matrix.target.arch }}
7481
publish:
7582
needs: buildx
7683
runs-on: ubuntu-22.04
7784
steps:
85+
-
86+
name: Checkout
87+
uses: actions/checkout@v3
88+
-
89+
uses: actions/setup-java@v3
90+
with:
91+
distribution: 'temurin'
92+
java-version: '17'
93+
cache: 'gradle'
94+
-
95+
run: chmod +x ${{github.workspace}}/gradlew
96+
# Set VERSION_INFORMATION
97+
-
98+
run: echo "VERSION_INFORMATION=$(${{github.workspace}}/gradlew -q ciPrintVersionInformation)" >> $GITHUB_ENV
7899
-
79100
name: Login to Docker Hub
80101
uses: docker/login-action@v2
81102
with:
82103
username: ${{ secrets.DOCKERHUB_USERNAME }}
83104
password: ${{ secrets.DOCKERHUB_TOKEN }}
84105
-
85-
name: Create Docker Manifest
106+
name: Create Docker Manifest for eritpchy/webdav-aliyundriver:latest(OLD)
86107
run: |
87108
docker manifest create eritpchy/webdav-aliyundriver:latest \
88-
--amend eritpchy/webdav-aliyundriver:2.4.0-amd64 \
89-
--amend eritpchy/webdav-aliyundriver:2.4.0-arm64
109+
--amend eritpchy/webdav-aliyundriver:${{ env.VERSION_INFORMATION }}-amd64 \
110+
--amend eritpchy/webdav-aliyundriver:${{ env.VERSION_INFORMATION }}-arm64
111+
-
112+
name: Push Docker Manifest for eritpchy/webdav-aliyundriver:latest(OLD)
113+
run: docker manifest push eritpchy/webdav-aliyundriver:latest
114+
-
115+
name: Create Docker Manifest for eritpchy/aliyundrive-webdav:latest
116+
run: |
117+
docker manifest create eritpchy/aliyundrive-webdav:latest \
118+
--amend eritpchy/aliyundrive-webdav:${{ env.VERSION_INFORMATION }}-amd64 \
119+
--amend eritpchy/aliyundrive-webdav:${{ env.VERSION_INFORMATION }}-arm64
90120
-
91-
name: Push Docker Manifest
92-
run: docker manifest push eritpchy/webdav-aliyundriver:latest
121+
name: Push Docker Manifest for eritpchy/aliyundrive-webdav:latest
122+
run: docker manifest push eritpchy/aliyundrive-webdav:latest

.github/workflows/build-jar.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Build Jar
4+
5+
# Controls when the action will run.
6+
on:
7+
push:
8+
branches:
9+
- '*'
10+
pull_request:
11+
branches:
12+
- '*'
13+
# schedule:
14+
# - cron: "0 0 * * */3"
15+
16+
# Allows you to run this workflow manually from the Actions tab
17+
workflow_dispatch:
18+
inputs:
19+
logLevel:
20+
description: 'Log level'
21+
required: true
22+
default: 'warning'
23+
tags:
24+
description: 'Test scenario tags'
25+
26+
env:
27+
TZ: Asia/Shanghai
28+
29+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
30+
jobs:
31+
buildx:
32+
runs-on: ${{ matrix.target.os }}
33+
strategy:
34+
matrix:
35+
target:
36+
- { os: ubuntu-22.04, arch: amd64, suffix: linux }
37+
steps:
38+
-
39+
name: Checkout
40+
uses: actions/checkout@v3
41+
-
42+
name: Get current date
43+
id: date
44+
run: echo "::set-output name=today::$(date +'%Y%m%d')"
45+
-
46+
name: Installing Graalvm dependencies
47+
run: sudo apt install -y make gcc libz-dev
48+
if: matrix.target.suffix == 'linux'
49+
-
50+
name: Setup Graalvm
51+
uses: graalvm/setup-graalvm@v1
52+
with:
53+
version: 'latest'
54+
java-version: '17'
55+
components: 'native-image'
56+
github-token: ${{ secrets.GITHUB_TOKEN }}
57+
cache: 'gradle'
58+
- run: chmod +x ./gradlew
59+
# Set VERSION_INFORMATION
60+
- run: echo "VERSION_INFORMATION=$(${{github.workspace}}/gradlew --no-daemon -q ciPrintVersionInformation)" >> $GITHUB_ENV
61+
-
62+
name: Build project
63+
run: ./gradlew --no-daemon :bootJar
64+
-
65+
name: Upload artifacts
66+
uses: bxb100/action-upload-webdav@v1
67+
with:
68+
webdav_address: ${{secrets.WEBDAV_ADDRESS}}
69+
webdav_username: ${{secrets.WEBDAV_USERNAME}}
70+
webdav_password: ${{secrets.WEBDAV_PASSWORD}}
71+
webdav_upload_path: "/${{ env.VERSION_INFORMATION }}"
72+
files: |
73+
build/libs/aliyundrive-webdav-${{ env.VERSION_INFORMATION }}.jar

.github/workflows/build-linux.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ jobs:
6464
name: Build project
6565
run: ./gradlew --no-daemon nativeCompile
6666
-
67-
run: mv build/native/nativeCompile/webdav-aliyundriver-android build/native/nativeCompile/webdav-aliyundriver-${{matrix.target.suffix}}-${{matrix.target.arch}}
67+
run: mv build/native/nativeCompile/aliyundrive-webdav build/native/nativeCompile/aliyundrive-webdav-${{matrix.target.suffix}}-${{matrix.target.arch}}
6868
-
6969
name: Archive artifacts
7070
uses: thedoctor0/zip-release@0.7.1
7171
with:
7272
type: 'tar'
73-
filename: 'webdav-aliyundriver-${{matrix.target.suffix}}-${{matrix.target.arch}}.tar.gz'
73+
filename: 'aliyundrive-webdav-${{matrix.target.suffix}}-${{matrix.target.arch}}.tar.gz'
7474
directory: 'build/native/nativeCompile/'
75-
path: "./webdav-aliyundriver-${{matrix.target.suffix}}-${{matrix.target.arch}}"
75+
path: "./aliyundrive-webdav-${{matrix.target.suffix}}-${{matrix.target.arch}}"
7676
-
7777
name: Upload artifacts
7878
uses: bxb100/action-upload-webdav@v1
@@ -82,4 +82,4 @@ jobs:
8282
webdav_password: ${{secrets.WEBDAV_PASSWORD}}
8383
webdav_upload_path: "/${{ env.VERSION_INFORMATION }}"
8484
files: |
85-
build/native/nativeCompile/webdav-aliyundriver-${{matrix.target.suffix}}-${{matrix.target.arch}}.tar.gz
85+
build/native/nativeCompile/aliyundrive-webdav-${{matrix.target.suffix}}-${{matrix.target.arch}}.tar.gz

.github/workflows/build-windows.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ jobs:
5757
name: Build project
5858
run: ./gradlew --no-daemon nativeCompile
5959
-
60-
run: mv build/native/nativeCompile/webdav-aliyundriver-android.exe build/native/nativeCompile/webdav-aliyundriver-${{matrix.target.suffix}}-${{matrix.target.arch}}.exe
60+
run: mv build/native/nativeCompile/aliyundrive-webdav.exe build/native/nativeCompile/aliyundrive-webdav-${{matrix.target.suffix}}-${{matrix.target.arch}}.exe
6161
-
6262
name: Archive artifacts
6363
uses: thedoctor0/zip-release@0.7.1
6464
with:
6565
type: 'zip'
66-
filename: 'webdav-aliyundriver-${{matrix.target.suffix}}-${{matrix.target.arch}}.exe.zip'
66+
filename: 'aliyundrive-webdav-${{matrix.target.suffix}}-${{matrix.target.arch}}.exe.zip'
6767
directory: 'build/native/nativeCompile/'
68-
path: "./webdav-aliyundriver-${{matrix.target.suffix}}-${{matrix.target.arch}}.exe"
68+
path: "./aliyundrive-webdav-${{matrix.target.suffix}}-${{matrix.target.arch}}.exe"
6969
-
7070
name: Upload artifacts
7171
uses: bxb100/action-upload-webdav@v1
@@ -75,4 +75,4 @@ jobs:
7575
webdav_password: ${{secrets.WEBDAV_PASSWORD}}
7676
webdav_upload_path: "/${{ env.VERSION_INFORMATION }}"
7777
files: |
78-
build/native/nativeCompile/webdav-aliyundriver-${{matrix.target.suffix}}-${{matrix.target.arch}}.exe.zip
78+
build/native/nativeCompile/aliyundrive-webdav-${{matrix.target.suffix}}-${{matrix.target.arch}}.exe.zip

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,6 @@ out/
3737
.vscode/
3838
*.log
3939
*.log.*
40+
41+
local.properties
42+
/conf/meta.json

Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM ubuntu:22.04 as builder
2-
RUN apt update
3-
RUN DEBIAN_FRONTEND=noninteractive apt install -y curl build-essential libz-dev zlib1g-dev
2+
RUN --mount=type=cache,target=/var/cache/apt \
3+
apt update \
4+
&& DEBIAN_FRONTEND=noninteractive apt install -y curl build-essential libz-dev zlib1g-dev
45
RUN curl -sL https://get.graalvm.org/jdk | bash -s --
56
ENV LANG=C.UTF-8
67
RUN cd /graalvm-ce-java* \
@@ -12,9 +13,12 @@ COPY ./build.gradle /tmp/webdav-aliyundriver/build.gradle
1213
COPY ./gradle /tmp/webdav-aliyundriver/gradle
1314
COPY ./gradlew /tmp/webdav-aliyundriver/gradlew
1415
COPY ./settings.gradle /tmp/webdav-aliyundriver/settings.gradle
15-
RUN . /tmp/env && cd /tmp/webdav-aliyundriver && ./gradlew --info dependencies
16+
COPY ./gradle.properties /tmp/webdav-aliyundriver/gradle.properties
17+
RUN --mount=type=cache,target=/root/.gradle \
18+
. /tmp/env && cd /tmp/webdav-aliyundriver && ./gradlew --info dependencies
1619
COPY ./ /tmp/webdav-aliyundriver
17-
RUN . /tmp/env \
20+
RUN --mount=type=cache,target=/root/.gradle \
21+
. /tmp/env \
1822
&& cd /tmp/webdav-aliyundriver \
1923
&& ./gradlew nativeCompile --no-daemon
2024
RUN chmod +x /tmp/webdav-aliyundriver/build/native/nativeCompile/webdav-aliyundriver

0 commit comments

Comments
 (0)