mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-07-18 17:38:07 +08:00
chore(docs&ci): change links in files & fix github ci and docker ci (#3)
* Enable blank issue * chore(README.md): update docs (temporally) * Update FUNDING.yml * chore: purge README.md * Update README.md Alist改为OpenList * Update README_cn.md Alist改为OpenList * Update README.md 漏了一处 * Update README_ja.md Alist改为OpenList * Update README_cn.md 漏了一处 * Update CODE_OF_CONDUCT.md 更改链接 * Update README.md 更新tg链接 * Update README_cn.md 更新tg链接 * Update README_ja.md 更新tg链接 * chore(build&docs): use new links in build and github templates * Update README.md 更新团队名 * chore: disable translation update, change beta release into artifacts * fix: disable docker build and name the uploaded artifacts * fix typo * Update README_cn.md 更新团队名称 * Update README_ja.md 更新 * Update project name in CONTRIBUTING.md * Update README_cn.md 更新 * Update README.md 更新 * Update README_ja.md * fix: fix artifact name * chore(build.sh): use original musl.cc * fix(ci): fix action artifacts upload * Update CODE_OF_CONDUCT.md TG更改为Telegram * Update README_cn.md 更新论坛链接 * Update README.md 更新论坛链接 * Update README_ja.md 更新论坛链接 * feat: update community based call back for onedrive * chore(ci): update musl.cc link * chore: use openlist as name instead of default OpenList * Update user.go * chore: fix artifact name * feat(ci): add docker build test * fix: add more platforms * fix: explicitly use docker.io * fix: fix typo * fix(docker): fix test build push platform * chore: change to OpenListTeam * Update CODE_OF_CONDUCT.md * doc: update org name * docs: change repo urls * feat: release docker image to ghcr.io on tagging * fix: fix the name of test_docker * build: update the names in docker-compose and docker file * chore: rename --------- Co-authored-by: ShenLin <773933146@qq.com> Co-authored-by: Hantong Chen <cxwdyx620@gmail.com> Co-authored-by: joshua <i@joshua.su> Co-authored-by: 绎泽 <yize@tencent.to> Co-authored-by: zyk2507 <93830642+zyk2507@users.noreply.github.com>
This commit is contained in:
18
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
18
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@ -12,18 +12,18 @@ body:
|
|||||||
attributes:
|
attributes:
|
||||||
label: Please make sure of the following things
|
label: Please make sure of the following things
|
||||||
description: |
|
description: |
|
||||||
You must check all the following, otherwise your issue may be closed directly. Or you can go to the [discussions](https://github.com/alist-org/alist/discussions)
|
You must check all the following, otherwise your issue may be closed directly. Or you can go to the [discussions](https://github.com/OpenListTeam/OpenList/discussions)
|
||||||
您必须勾选以下所有内容,否则您的issue可能会被直接关闭。或者您可以去[讨论区](https://github.com/alist-org/alist/discussions)
|
您必须勾选以下所有内容,否则您的issue可能会被直接关闭。或者您可以去[讨论区](https://github.com/OpenListTeam/OpenList/discussions)
|
||||||
options:
|
options:
|
||||||
- label: |
|
- label: |
|
||||||
I have read the [documentation](https://alist.nn.ci).
|
I have read the [documentation](https://openlistteam.github.io/docs).
|
||||||
我已经阅读了[文档](https://alist.nn.ci)。
|
我已经阅读了[文档](https://openlistteam.github.io/docs)。
|
||||||
- label: |
|
- label: |
|
||||||
I'm sure there are no duplicate issues or discussions.
|
I'm sure there are no duplicate issues or discussions.
|
||||||
我确定没有重复的issue或讨论。
|
我确定没有重复的issue或讨论。
|
||||||
- label: |
|
- label: |
|
||||||
I'm sure it's due to `AList` and not something else(such as [Network](https://alist.nn.ci/faq/howto.html#tls-handshake-timeout-read-connection-reset-by-peer-dns-lookup-failed-connect-connection-refused-client-timeout-exceeded-while-awaiting-headers-no-such-host) ,`Dependencies` or `Operational`).
|
I'm sure it's due to `OpenList` and not something else(such as [Network](https://openlistteam.github.io/docs/faq/howto.html#tls-handshake-timeout-read-connection-reset-by-peer-dns-lookup-failed-connect-connection-refused-client-timeout-exceeded-while-awaiting-headers-no-such-host) ,`Dependencies` or `Operational`).
|
||||||
我确定是`AList`的问题,而不是其他原因(例如[网络](https://alist.nn.ci/zh/faq/howto.html#tls-handshake-timeout-read-connection-reset-by-peer-dns-lookup-failed-connect-connection-refused-client-timeout-exceeded-while-awaiting-headers-no-such-host),`依赖`或`操作`)。
|
我确定是`OpenList`的问题,而不是其他原因(例如[网络](https://openlistteam.github.io/docs/zh/faq/howto.html#tls-handshake-timeout-read-connection-reset-by-peer-dns-lookup-failed-connect-connection-refused-client-timeout-exceeded-while-awaiting-headers-no-such-host),`依赖`或`操作`)。
|
||||||
- label: |
|
- label: |
|
||||||
I'm sure this issue is not fixed in the latest version.
|
I'm sure this issue is not fixed in the latest version.
|
||||||
我确定这个问题在最新版本中没有被修复。
|
我确定这个问题在最新版本中没有被修复。
|
||||||
@ -31,7 +31,7 @@ body:
|
|||||||
- type: input
|
- type: input
|
||||||
id: version
|
id: version
|
||||||
attributes:
|
attributes:
|
||||||
label: AList Version / AList 版本
|
label: OpenList Version / OpenList 版本
|
||||||
description: |
|
description: |
|
||||||
What version of our software are you running? Do not use `latest` or `master` as an answer.
|
What version of our software are you running? Do not use `latest` or `master` as an answer.
|
||||||
您使用的是哪个版本的软件?请不要使用`latest`或`master`作为答案。
|
您使用的是哪个版本的软件?请不要使用`latest`或`master`作为答案。
|
||||||
@ -68,8 +68,8 @@ body:
|
|||||||
attributes:
|
attributes:
|
||||||
label: Config / 配置
|
label: Config / 配置
|
||||||
description: |
|
description: |
|
||||||
Please provide the configuration file of your `AList` application and take a screenshot of the relevant storage configuration. (hide privacy field)
|
Please provide the configuration file of your `OpenList` application and take a screenshot of the relevant storage configuration. (hide privacy field)
|
||||||
请提供您的`AList`应用的配置文件,并截图相关存储配置。(隐藏隐私字段)
|
请提供您的`OpenList`应用的配置文件,并截图相关存储配置。(隐藏隐私字段)
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
|
2
.github/ISSUE_TEMPLATE/config.yml
vendored
2
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -1,5 +1,5 @@
|
|||||||
blank_issues_enabled: true
|
blank_issues_enabled: true
|
||||||
contact_links:
|
contact_links:
|
||||||
- name: Questions & Discussions
|
- name: Questions & Discussions
|
||||||
url: https://github.com/alist-org/alist/discussions
|
url: https://github.com/OpenListTeam/OpenList/discussions
|
||||||
about: Use GitHub discussions for message-board style questions and discussions.
|
about: Use GitHub discussions for message-board style questions and discussions.
|
||||||
|
2
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
2
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@ -7,7 +7,7 @@ body:
|
|||||||
label: Please make sure of the following things
|
label: Please make sure of the following things
|
||||||
description: You may select more than one, even select all.
|
description: You may select more than one, even select all.
|
||||||
options:
|
options:
|
||||||
- label: I have read the [documentation](https://alist.nn.ci).
|
- label: I have read the [documentation](https://openlistteam.github.io/docs).
|
||||||
- label: I'm sure there are no duplicate issues or discussions.
|
- label: I'm sure there are no duplicate issues or discussions.
|
||||||
- label: I'm sure this feature is not implemented.
|
- label: I'm sure this feature is not implemented.
|
||||||
- label: I'm sure it's a reasonable and popular requirement.
|
- label: I'm sure it's a reasonable and popular requirement.
|
||||||
|
17
.github/workflows/auto_lang.yml
vendored
17
.github/workflows/auto_lang.yml
vendored
@ -1,14 +1,15 @@
|
|||||||
name: auto_lang
|
name: auto_lang
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
# Disable translation generation, enable it after everything is setup.
|
||||||
branches:
|
# push:
|
||||||
- 'main'
|
# branches:
|
||||||
paths:
|
# - 'main'
|
||||||
- 'drivers/**'
|
# paths:
|
||||||
- 'internal/bootstrap/data/setting.go'
|
# - 'drivers/**'
|
||||||
- 'internal/conf/const.go'
|
# - 'internal/bootstrap/data/setting.go'
|
||||||
- 'cmd/lang.go'
|
# - 'internal/conf/const.go'
|
||||||
|
# - 'cmd/lang.go'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
|
104
.github/workflows/beta_release.yml
vendored
104
.github/workflows/beta_release.yml
vendored
@ -41,15 +41,22 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git tag -l
|
git tag -l
|
||||||
npx changelogithub --output CHANGELOG.md
|
npx changelogithub --output CHANGELOG.md
|
||||||
# npx changelogen@latest --output CHANGELOG.md
|
|
||||||
|
|
||||||
|
# Disable this right now, use github workflow assets for easier manipulation
|
||||||
|
# - name: Upload assets
|
||||||
|
# uses: softprops/action-gh-release@v2
|
||||||
|
# with:
|
||||||
|
# body_path: "See CHANGELOG.md"
|
||||||
|
# files: CHANGELOG.md
|
||||||
|
# prerelease: true
|
||||||
|
# tag_name: beta
|
||||||
- name: Upload assets
|
- name: Upload assets
|
||||||
uses: softprops/action-gh-release@v2
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
body_path: CHANGELOG.md
|
name: beta changelog
|
||||||
files: CHANGELOG.md
|
path: ${{ github.workspace }}/CHANGELOG.md
|
||||||
prerelease: true
|
compression-level: 0
|
||||||
tag_name: beta
|
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs:
|
needs:
|
||||||
@ -87,14 +94,16 @@ jobs:
|
|||||||
run: bash build.sh dev web
|
run: bash build.sh dev web
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: go-cross/cgo-actions@v1
|
uses: go-cross/cgo-actions@454cfd6d20816878926b0253ca8f2dbbd2f7d731 # V1.1.0
|
||||||
with:
|
with:
|
||||||
targets: ${{ matrix.target }}
|
targets: ${{ matrix.target }}
|
||||||
musl-target-format: $os-$musl-$arch
|
musl-target-format: $os-$musl-$arch
|
||||||
out-dir: build
|
out-dir: build
|
||||||
|
output: openlist-$target$ext
|
||||||
|
musl-base-url: "https://github.com/OpenListTeam/musl-compilers/releases/download/2025-06-12/"
|
||||||
x-flags: |
|
x-flags: |
|
||||||
github.com/alist-org/alist/v3/internal/conf.BuiltAt=$built_at
|
github.com/alist-org/alist/v3/internal/conf.BuiltAt=$built_at
|
||||||
github.com/alist-org/alist/v3/internal/conf.GitAuthor=Xhofe
|
github.com/alist-org/alist/v3/internal/conf.GitAuthor=OpenList
|
||||||
github.com/alist-org/alist/v3/internal/conf.GitCommit=$git_commit
|
github.com/alist-org/alist/v3/internal/conf.GitCommit=$git_commit
|
||||||
github.com/alist-org/alist/v3/internal/conf.Version=$tag
|
github.com/alist-org/alist/v3/internal/conf.Version=$tag
|
||||||
github.com/alist-org/alist/v3/internal/conf.WebVersion=dev
|
github.com/alist-org/alist/v3/internal/conf.WebVersion=dev
|
||||||
@ -102,37 +111,56 @@ jobs:
|
|||||||
- name: Compress
|
- name: Compress
|
||||||
run: |
|
run: |
|
||||||
bash build.sh zip ${{ matrix.hash }}
|
bash build.sh zip ${{ matrix.hash }}
|
||||||
|
|
||||||
- name: Upload assets
|
|
||||||
uses: softprops/action-gh-release@v2
|
|
||||||
with:
|
|
||||||
files: build/compress/*
|
|
||||||
prerelease: true
|
|
||||||
tag_name: beta
|
|
||||||
|
|
||||||
desktop:
|
|
||||||
needs:
|
|
||||||
- release
|
|
||||||
name: Beta Release Desktop
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: alist-org/desktop-release
|
|
||||||
ref: main
|
|
||||||
persist-credentials: false
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Commit
|
# See above
|
||||||
|
# - name: Upload assets
|
||||||
|
# uses: softprops/action-gh-release@v2
|
||||||
|
# with:
|
||||||
|
# files: build/compress/*
|
||||||
|
# prerelease: true
|
||||||
|
# tag_name: beta
|
||||||
|
|
||||||
|
- name: Clean illegal characters from matrix.target
|
||||||
|
id: clean_target_name
|
||||||
run: |
|
run: |
|
||||||
git config --local user.email "bot@nn.ci"
|
ILLEGAL_CHARS_REGEX='[":<>|*?\\/\r\n]'
|
||||||
git config --local user.name "IlaBot"
|
CLEANED_TARGET=$(echo "${{ matrix.target }}" | sed -E "s/$ILLEGAL_CHARS_REGEX//g")
|
||||||
git commit --allow-empty -m "Trigger build for ${{ github.sha }}"
|
echo "Original target: ${{ matrix.target }}"
|
||||||
|
echo "Cleaned target: $CLEANED_TARGET"
|
||||||
|
echo "cleaned_target=$CLEANED_TARGET" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Push commit
|
- name: Upload assets
|
||||||
uses: ad-m/github-push-action@master
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.MY_TOKEN }}
|
name: beta builds for ${{ env.cleaned_target }}
|
||||||
branch: main
|
path: ${{ github.workspace }}/build/compress/*
|
||||||
repository: alist-org/desktop-release
|
compression-level: 0
|
||||||
|
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
|
||||||
|
|
||||||
|
# TODO: We do not have desktop clients right now.
|
||||||
|
# desktop:
|
||||||
|
# needs:
|
||||||
|
# - release
|
||||||
|
# name: Beta Release Desktop
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# steps:
|
||||||
|
# - name: Checkout repo
|
||||||
|
# uses: actions/checkout@v4
|
||||||
|
# with:
|
||||||
|
# repository: alist-org/desktop-release
|
||||||
|
# ref: main
|
||||||
|
# persist-credentials: false
|
||||||
|
# fetch-depth: 0
|
||||||
|
|
||||||
|
# - name: Commit
|
||||||
|
# run: |
|
||||||
|
# git config --local user.email "bot@nn.ci"
|
||||||
|
# git config --local user.name "IlaBot"
|
||||||
|
# git commit --allow-empty -m "Trigger build for ${{ github.sha }}"
|
||||||
|
|
||||||
|
# - name: Push commit
|
||||||
|
# uses: ad-m/github-push-action@master
|
||||||
|
# with:
|
||||||
|
# github_token: ${{ secrets.MY_TOKEN }}
|
||||||
|
# branch: main
|
||||||
|
# repository: alist-org/desktop-release
|
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -57,5 +57,5 @@ jobs:
|
|||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: alist_${{ env.SHA }}_${{ matrix.target }}
|
name: openlist_${{ env.SHA }}_${{ matrix.target }}
|
||||||
path: build/*
|
path: build/*
|
49
.github/workflows/release.yml
vendored
49
.github/workflows/release.yml
vendored
@ -64,29 +64,30 @@ jobs:
|
|||||||
files: build/compress/*
|
files: build/compress/*
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
|
||||||
release_desktop:
|
# We don't have desktop right now
|
||||||
needs: release
|
# release_desktop:
|
||||||
name: Release desktop
|
# needs: release
|
||||||
runs-on: ubuntu-latest
|
# name: Release desktop
|
||||||
steps:
|
# runs-on: ubuntu-latest
|
||||||
- name: Checkout repo
|
# steps:
|
||||||
uses: actions/checkout@v4
|
# - name: Checkout repo
|
||||||
with:
|
# uses: actions/checkout@v4
|
||||||
repository: alist-org/desktop-release
|
# with:
|
||||||
ref: main
|
# repository: alist-org/desktop-release
|
||||||
persist-credentials: false
|
# ref: main
|
||||||
fetch-depth: 0
|
# persist-credentials: false
|
||||||
|
# fetch-depth: 0
|
||||||
|
|
||||||
- name: Add tag
|
# - name: Add tag
|
||||||
run: |
|
# run: |
|
||||||
git config --local user.email "bot@nn.ci"
|
# git config --local user.email "bot@nn.ci"
|
||||||
git config --local user.name "IlaBot"
|
# git config --local user.name "IlaBot"
|
||||||
version=$(wget -qO- -t1 -T2 "https://api.github.com/repos/alist-org/alist/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g')
|
# version=$(wget -qO- -t1 -T2 "https://api.github.com/repos/alist-org/alist/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g')
|
||||||
git tag -a $version -m "release $version"
|
# git tag -a $version -m "release $version"
|
||||||
|
|
||||||
- name: Push tags
|
# - name: Push tags
|
||||||
uses: ad-m/github-push-action@master
|
# uses: ad-m/github-push-action@master
|
||||||
with:
|
# with:
|
||||||
github_token: ${{ secrets.MY_TOKEN }}
|
# github_token: ${{ secrets.MY_TOKEN }}
|
||||||
branch: main
|
# branch: main
|
||||||
repository: alist-org/desktop-release
|
# repository: alist-org/desktop-release
|
22
.github/workflows/release_docker.yml
vendored
22
.github/workflows/release_docker.yml
vendored
@ -1,23 +1,19 @@
|
|||||||
name: release_docker
|
name: release_docker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: 'xhofe/alist'
|
ORG_NAME: openlistteam
|
||||||
REGISTRY_USERNAME: 'xhofe'
|
IMAGE_NAME: openlist
|
||||||
REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
|
REGISTRY: ghcr.io
|
||||||
ARTIFACT_NAME: 'binaries_docker_release'
|
ARTIFACT_NAME: 'binaries_docker_release'
|
||||||
RELEASE_PLATFORMS: 'linux/amd64,linux/arm64,linux/arm/v7,linux/386,linux/arm/v6,linux/s390x,linux/ppc64le,linux/riscv64'
|
RELEASE_PLATFORMS: 'linux/amd64,linux/arm64,linux/arm/v7,linux/386,linux/arm/v6,linux/s390x,linux/ppc64le,linux/riscv64'
|
||||||
IMAGE_PUSH: ${{ github.event_name == 'push' }}
|
IMAGE_PUSH: ${{ github.event_name == 'push' }}
|
||||||
@ -106,19 +102,19 @@ jobs:
|
|||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to GitHub Container Registry
|
||||||
if: env.IMAGE_PUSH == 'true'
|
if: env.IMAGE_PUSH == 'true'
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
logout: true
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ env.REGISTRY_USERNAME }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ env.REGISTRY_PASSWORD }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}
|
images: ${{ env.REGISTRY }}/${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }}
|
||||||
tags: ${{ env.IMAGE_IS_PROD == 'true' && '' || env.IMAGE_TAGS_BETA }}
|
tags: ${{ env.IMAGE_IS_PROD == 'true' && '' || env.IMAGE_TAGS_BETA }}
|
||||||
flavor: |
|
flavor: |
|
||||||
${{ env.IMAGE_IS_PROD == 'true' && 'latest=true' || '' }}
|
${{ env.IMAGE_IS_PROD == 'true' && 'latest=true' || '' }}
|
||||||
|
132
.github/workflows/test_docker.yml
vendored
Normal file
132
.github/workflows/test_docker.yml
vendored
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
name: test_docker
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
ORG_NAME: openlistteam
|
||||||
|
IMAGE_NAME: openlist-git
|
||||||
|
REGISTRY: ghcr.io
|
||||||
|
ARTIFACT_NAME: 'binaries_docker_release'
|
||||||
|
RELEASE_PLATFORMS: 'linux/amd64,linux/arm64,linux/arm/v7,linux/386,linux/arm/v6,linux/s390x,linux/ppc64le,linux/riscv64'
|
||||||
|
IMAGE_PUSH: ${{ github.event_name == 'push' }}
|
||||||
|
IMAGE_TAGS_BETA: |
|
||||||
|
type=schedule
|
||||||
|
type=ref,event=branch
|
||||||
|
type=ref,event=tag
|
||||||
|
type=ref,event=pr
|
||||||
|
type=raw,value=beta,enable={{is_default_branch}}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_binary:
|
||||||
|
name: Build Binaries for Docker Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: 'stable'
|
||||||
|
|
||||||
|
- name: Cache Musl
|
||||||
|
id: cache-musl
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: build/musl-libs
|
||||||
|
key: docker-musl-libs-v2
|
||||||
|
|
||||||
|
- name: Download Musl Library
|
||||||
|
if: steps.cache-musl.outputs.cache-hit != 'true'
|
||||||
|
run: bash build.sh prepare docker-multiplatform
|
||||||
|
|
||||||
|
- name: Build go binary (beta)
|
||||||
|
run: bash build.sh beta docker-multiplatform
|
||||||
|
|
||||||
|
- name: Upload artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ env.ARTIFACT_NAME }}
|
||||||
|
overwrite: true
|
||||||
|
path: |
|
||||||
|
build/
|
||||||
|
!build/*.tgz
|
||||||
|
!build/musl-libs/**
|
||||||
|
|
||||||
|
release_docker:
|
||||||
|
needs: build_binary
|
||||||
|
name: Release Docker image
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
image: ["latest", "ffmpeg", "aria2", "aio"]
|
||||||
|
include:
|
||||||
|
- image: "latest"
|
||||||
|
build_arg: ""
|
||||||
|
tag_favor: ""
|
||||||
|
- image: "ffmpeg"
|
||||||
|
build_arg: INSTALL_FFMPEG=true
|
||||||
|
tag_favor: "suffix=-ffmpeg,onlatest=true"
|
||||||
|
- image: "aria2"
|
||||||
|
build_arg: INSTALL_ARIA2=true
|
||||||
|
tag_favor: "suffix=-aria2,onlatest=true"
|
||||||
|
- image: "aio"
|
||||||
|
build_arg: |
|
||||||
|
INSTALL_FFMPEG=true
|
||||||
|
INSTALL_ARIA2=true
|
||||||
|
tag_favor: "suffix=-aio,onlatest=true"
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ env.ARTIFACT_NAME }}
|
||||||
|
path: 'build/'
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
if: env.IMAGE_PUSH == 'true'
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: ${{ env.REGISTRY }}/${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }}
|
||||||
|
tags: ${{ env.IMAGE_TAGS_BETA }}
|
||||||
|
flavor: |
|
||||||
|
${{ matrix.tag_favor }}
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
id: docker_build
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.ci
|
||||||
|
push: ${{ env.IMAGE_PUSH == 'true' }}
|
||||||
|
build-args: ${{ matrix.build_arg }}
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
platforms: ${{ env.RELEASE_PLATFORMS }}
|
@ -103,5 +103,5 @@ The rest of the commit message is then used for this.
|
|||||||
|
|
||||||
## Submit a pull request
|
## Submit a pull request
|
||||||
|
|
||||||
Push your branch to your `alist` fork and open a pull request against the
|
Push your branch to your `openlist` fork and open a pull request against the
|
||||||
`main` branch.
|
`main` branch.
|
||||||
|
10
Dockerfile
10
Dockerfile
@ -1,4 +1,4 @@
|
|||||||
FROM alpine:edge as builder
|
FROM docker.io/library/alpine:edge as builder
|
||||||
LABEL stage=go-builder
|
LABEL stage=go-builder
|
||||||
WORKDIR /app/
|
WORKDIR /app/
|
||||||
RUN apk add --no-cache bash curl gcc git go musl-dev
|
RUN apk add --no-cache bash curl gcc git go musl-dev
|
||||||
@ -11,9 +11,9 @@ FROM alpine:edge
|
|||||||
|
|
||||||
ARG INSTALL_FFMPEG=false
|
ARG INSTALL_FFMPEG=false
|
||||||
ARG INSTALL_ARIA2=false
|
ARG INSTALL_ARIA2=false
|
||||||
LABEL MAINTAINER="i@nn.ci"
|
LABEL MAINTAINER="OpenList"
|
||||||
|
|
||||||
WORKDIR /opt/alist/
|
WORKDIR /opt/openlist/
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
apk upgrade --no-cache && \
|
apk upgrade --no-cache && \
|
||||||
@ -32,11 +32,11 @@ RUN apk update && \
|
|||||||
/opt/aria2/.aria2/tracker.sh ; \
|
/opt/aria2/.aria2/tracker.sh ; \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
COPY --chmod=755 --from=builder /app/bin/alist ./
|
COPY --chmod=755 --from=builder /app/bin/openlist ./
|
||||||
COPY --chmod=755 entrypoint.sh /entrypoint.sh
|
COPY --chmod=755 entrypoint.sh /entrypoint.sh
|
||||||
RUN /entrypoint.sh version
|
RUN /entrypoint.sh version
|
||||||
|
|
||||||
ENV PUID=0 PGID=0 UMASK=022 RUN_ARIA2=${INSTALL_ARIA2}
|
ENV PUID=0 PGID=0 UMASK=022 RUN_ARIA2=${INSTALL_ARIA2}
|
||||||
VOLUME /opt/alist/data/
|
VOLUME /opt/openlist/data/
|
||||||
EXPOSE 5244 5245
|
EXPOSE 5244 5245
|
||||||
CMD [ "/entrypoint.sh" ]
|
CMD [ "/entrypoint.sh" ]
|
@ -1,11 +1,11 @@
|
|||||||
FROM alpine:edge
|
FROM docker.io/library/alpine:edge
|
||||||
|
|
||||||
ARG TARGETPLATFORM
|
ARG TARGETPLATFORM
|
||||||
ARG INSTALL_FFMPEG=false
|
ARG INSTALL_FFMPEG=false
|
||||||
ARG INSTALL_ARIA2=false
|
ARG INSTALL_ARIA2=false
|
||||||
LABEL MAINTAINER="i@nn.ci"
|
LABEL MAINTAINER="OpenList"
|
||||||
|
|
||||||
WORKDIR /opt/alist/
|
WORKDIR /opt/openlist/
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
apk upgrade --no-cache && \
|
apk upgrade --no-cache && \
|
||||||
@ -24,11 +24,11 @@ RUN apk update && \
|
|||||||
/opt/aria2/.aria2/tracker.sh ; \
|
/opt/aria2/.aria2/tracker.sh ; \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
COPY --chmod=755 /build/${TARGETPLATFORM}/alist ./
|
COPY --chmod=755 /build/${TARGETPLATFORM}/openlist ./
|
||||||
COPY --chmod=755 entrypoint.sh /entrypoint.sh
|
COPY --chmod=755 entrypoint.sh /entrypoint.sh
|
||||||
RUN /entrypoint.sh version
|
RUN /entrypoint.sh version
|
||||||
|
|
||||||
ENV PUID=0 PGID=0 UMASK=022 RUN_ARIA2=${INSTALL_ARIA2}
|
ENV PUID=0 PGID=0 UMASK=022 RUN_ARIA2=${INSTALL_ARIA2}
|
||||||
VOLUME /opt/alist/data/
|
VOLUME /opt/openlist/data/
|
||||||
EXPOSE 5244 5245
|
EXPOSE 5244 5245
|
||||||
CMD [ "/entrypoint.sh" ]
|
CMD [ "/entrypoint.sh" ]
|
@ -112,7 +112,7 @@ N/A
|
|||||||
|
|
||||||
これらの素晴らしい人々に感謝します:
|
これらの素晴らしい人々に感謝します:
|
||||||
|
|
||||||
[](https://github.com/OpenListTeam/OpenList/graphs/contributors)
|
[](https://github.com/OpenListTeam/OpenList/graphs/contributors)
|
||||||
|
|
||||||
## ライセンス
|
## ライセンス
|
||||||
|
|
||||||
|
77
build.sh
77
build.sh
@ -1,6 +1,6 @@
|
|||||||
appName="alist"
|
appName="openlist"
|
||||||
builtAt="$(date +'%F %T %z')"
|
builtAt="$(date +'%F %T %z')"
|
||||||
gitAuthor="Xhofe <i@nn.ci>"
|
gitAuthor="OpenList <github-workflow@noreply.example.com>"
|
||||||
gitCommit=$(git log --pretty=format:"%h" -1)
|
gitCommit=$(git log --pretty=format:"%h" -1)
|
||||||
|
|
||||||
if [ "$1" = "dev" ]; then
|
if [ "$1" = "dev" ]; then
|
||||||
@ -10,8 +10,14 @@ elif [ "$1" = "beta" ]; then
|
|||||||
version="beta"
|
version="beta"
|
||||||
webVersion="dev"
|
webVersion="dev"
|
||||||
else
|
else
|
||||||
git tag -d beta
|
git tag -d beta || true
|
||||||
version=$(git describe --abbrev=0 --tags)
|
# Always true if there's no tag
|
||||||
|
version=$(git describe --abbrev=0 --tags) || true
|
||||||
|
if [ -z "$version" ]; then
|
||||||
|
echo "version is empty, assign a default value ..."
|
||||||
|
version="0.0.1"
|
||||||
|
fi
|
||||||
|
# TODO: Repleace this assets with our new frontend if needed
|
||||||
webVersion=$(wget -qO- -t1 -T2 "https://api.github.com/repos/alist-org/alist-web/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g')
|
webVersion=$(wget -qO- -t1 -T2 "https://api.github.com/repos/alist-org/alist-web/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -59,7 +65,7 @@ BuildDev() {
|
|||||||
rm -rf .git/
|
rm -rf .git/
|
||||||
mkdir -p "dist"
|
mkdir -p "dist"
|
||||||
muslflags="--extldflags '-static -fpic' $ldflags"
|
muslflags="--extldflags '-static -fpic' $ldflags"
|
||||||
BASE="https://musl.nn.ci/"
|
BASE="https://github.com/OpenListTeam/musl-compilers/releases/download/2025-06-12/"
|
||||||
FILES=(x86_64-linux-musl-cross aarch64-linux-musl-cross)
|
FILES=(x86_64-linux-musl-cross aarch64-linux-musl-cross)
|
||||||
for i in "${FILES[@]}"; do
|
for i in "${FILES[@]}"; do
|
||||||
url="${BASE}${i}.tgz"
|
url="${BASE}${i}.tgz"
|
||||||
@ -79,21 +85,21 @@ BuildDev() {
|
|||||||
go build -o ./dist/$appName-$os_arch -ldflags="$muslflags" -tags=jsoniter .
|
go build -o ./dist/$appName-$os_arch -ldflags="$muslflags" -tags=jsoniter .
|
||||||
done
|
done
|
||||||
xgo -targets=windows/amd64,darwin/amd64,darwin/arm64 -out "$appName" -ldflags="$ldflags" -tags=jsoniter .
|
xgo -targets=windows/amd64,darwin/amd64,darwin/arm64 -out "$appName" -ldflags="$ldflags" -tags=jsoniter .
|
||||||
mv alist-* dist
|
mv "$appName"-* dist
|
||||||
cd dist
|
cd dist
|
||||||
cp ./alist-windows-amd64.exe ./alist-windows-amd64-upx.exe
|
cp ./"$appName"-windows-amd64.exe ./"$appName"-windows-amd64-upx.exe
|
||||||
upx -9 ./alist-windows-amd64-upx.exe
|
upx -9 ./"$appName"-windows-amd64-upx.exe
|
||||||
find . -type f -print0 | xargs -0 md5sum >md5.txt
|
find . -type f -print0 | xargs -0 md5sum >md5.txt
|
||||||
cat md5.txt
|
cat md5.txt
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildDocker() {
|
BuildDocker() {
|
||||||
go build -o ./bin/alist -ldflags="$ldflags" -tags=jsoniter .
|
go build -o ./bin/"$appName" -ldflags="$ldflags" -tags=jsoniter .
|
||||||
}
|
}
|
||||||
|
|
||||||
PrepareBuildDockerMusl() {
|
PrepareBuildDockerMusl() {
|
||||||
mkdir -p build/musl-libs
|
mkdir -p build/musl-libs
|
||||||
BASE="https://musl.cc/"
|
BASE="https://github.com/OpenListTeam/musl-compilers/releases/download/2025-06-12/"
|
||||||
FILES=(x86_64-linux-musl-cross aarch64-linux-musl-cross i486-linux-musl-cross s390x-linux-musl-cross armv6-linux-musleabihf-cross armv7l-linux-musleabihf-cross riscv64-linux-musl-cross powerpc64le-linux-musl-cross)
|
FILES=(x86_64-linux-musl-cross aarch64-linux-musl-cross i486-linux-musl-cross s390x-linux-musl-cross armv6-linux-musleabihf-cross armv7l-linux-musleabihf-cross riscv64-linux-musl-cross powerpc64le-linux-musl-cross)
|
||||||
for i in "${FILES[@]}"; do
|
for i in "${FILES[@]}"; do
|
||||||
url="${BASE}${i}.tgz"
|
url="${BASE}${i}.tgz"
|
||||||
@ -124,7 +130,7 @@ BuildDockerMultiplatform() {
|
|||||||
export GOARCH=$arch
|
export GOARCH=$arch
|
||||||
export CC=${cgo_cc}
|
export CC=${cgo_cc}
|
||||||
echo "building for $os_arch"
|
echo "building for $os_arch"
|
||||||
go build -o build/$os/$arch/alist -ldflags="$docker_lflags" -tags=jsoniter .
|
go build -o build/$os/$arch/"$appName" -ldflags="$docker_lflags" -tags=jsoniter .
|
||||||
done
|
done
|
||||||
|
|
||||||
DOCKER_ARM_ARCHES=(linux-arm/v6 linux-arm/v7)
|
DOCKER_ARM_ARCHES=(linux-arm/v6 linux-arm/v7)
|
||||||
@ -138,27 +144,27 @@ BuildDockerMultiplatform() {
|
|||||||
export GOARM=${GO_ARM[$i]}
|
export GOARM=${GO_ARM[$i]}
|
||||||
export CC=${cgo_cc}
|
export CC=${cgo_cc}
|
||||||
echo "building for $docker_arch"
|
echo "building for $docker_arch"
|
||||||
go build -o build/${docker_arch%%-*}/${docker_arch##*-}/alist -ldflags="$docker_lflags" -tags=jsoniter .
|
go build -o build/${docker_arch%%-*}/${docker_arch##*-}/"$appName" -ldflags="$docker_lflags" -tags=jsoniter .
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildRelease() {
|
BuildRelease() {
|
||||||
rm -rf .git/
|
rm -rf .git/
|
||||||
mkdir -p "build"
|
mkdir -p "build"
|
||||||
BuildWinArm64 ./build/alist-windows-arm64.exe
|
BuildWinArm64 ./build/"$appName"-windows-arm64.exe
|
||||||
xgo -out "$appName" -ldflags="$ldflags" -tags=jsoniter .
|
xgo -out "$appName" -ldflags="$ldflags" -tags=jsoniter .
|
||||||
# why? Because some target platforms seem to have issues with upx compression
|
# why? Because some target platforms seem to have issues with upx compression
|
||||||
upx -9 ./alist-linux-amd64
|
upx -9 ./"$appName"-linux-amd64
|
||||||
cp ./alist-windows-amd64.exe ./alist-windows-amd64-upx.exe
|
cp ./"$appName"-windows-amd64.exe ./"$appName"-windows-amd64-upx.exe
|
||||||
upx -9 ./alist-windows-amd64-upx.exe
|
upx -9 ./"$appName"-windows-amd64-upx.exe
|
||||||
mv alist-* build
|
mv "$appName"-* build
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildReleaseLinuxMusl() {
|
BuildReleaseLinuxMusl() {
|
||||||
rm -rf .git/
|
rm -rf .git/
|
||||||
mkdir -p "build"
|
mkdir -p "build"
|
||||||
muslflags="--extldflags '-static -fpic' $ldflags"
|
muslflags="--extldflags '-static -fpic' $ldflags"
|
||||||
BASE="https://musl.nn.ci/"
|
BASE="https://github.com/OpenListTeam/musl-compilers/releases/download/2025-06-12/"
|
||||||
FILES=(x86_64-linux-musl-cross aarch64-linux-musl-cross mips-linux-musl-cross mips64-linux-musl-cross mips64el-linux-musl-cross mipsel-linux-musl-cross powerpc64le-linux-musl-cross s390x-linux-musl-cross)
|
FILES=(x86_64-linux-musl-cross aarch64-linux-musl-cross mips-linux-musl-cross mips64-linux-musl-cross mips64el-linux-musl-cross mipsel-linux-musl-cross powerpc64le-linux-musl-cross s390x-linux-musl-cross)
|
||||||
for i in "${FILES[@]}"; do
|
for i in "${FILES[@]}"; do
|
||||||
url="${BASE}${i}.tgz"
|
url="${BASE}${i}.tgz"
|
||||||
@ -184,7 +190,7 @@ BuildReleaseLinuxMuslArm() {
|
|||||||
rm -rf .git/
|
rm -rf .git/
|
||||||
mkdir -p "build"
|
mkdir -p "build"
|
||||||
muslflags="--extldflags '-static -fpic' $ldflags"
|
muslflags="--extldflags '-static -fpic' $ldflags"
|
||||||
BASE="https://musl.nn.ci/"
|
BASE="https://github.com/OpenListTeam/musl-compilers/releases/download/2025-06-12/"
|
||||||
# FILES=(arm-linux-musleabi-cross arm-linux-musleabihf-cross armeb-linux-musleabi-cross armeb-linux-musleabihf-cross armel-linux-musleabi-cross armel-linux-musleabihf-cross armv5l-linux-musleabi-cross armv5l-linux-musleabihf-cross armv6-linux-musleabi-cross armv6-linux-musleabihf-cross armv7l-linux-musleabihf-cross armv7m-linux-musleabi-cross armv7r-linux-musleabihf-cross)
|
# FILES=(arm-linux-musleabi-cross arm-linux-musleabihf-cross armeb-linux-musleabi-cross armeb-linux-musleabihf-cross armel-linux-musleabi-cross armel-linux-musleabihf-cross armv5l-linux-musleabi-cross armv5l-linux-musleabihf-cross armv6-linux-musleabi-cross armv6-linux-musleabihf-cross armv7l-linux-musleabihf-cross armv7m-linux-musleabi-cross armv7r-linux-musleabihf-cross)
|
||||||
FILES=(arm-linux-musleabi-cross arm-linux-musleabihf-cross armel-linux-musleabi-cross armel-linux-musleabihf-cross armv5l-linux-musleabi-cross armv5l-linux-musleabihf-cross armv6-linux-musleabi-cross armv6-linux-musleabihf-cross armv7l-linux-musleabihf-cross armv7m-linux-musleabi-cross armv7r-linux-musleabihf-cross)
|
FILES=(arm-linux-musleabi-cross arm-linux-musleabihf-cross armel-linux-musleabi-cross armel-linux-musleabihf-cross armv5l-linux-musleabi-cross armv5l-linux-musleabihf-cross armv6-linux-musleabi-cross armv6-linux-musleabihf-cross armv7l-linux-musleabihf-cross armv7m-linux-musleabi-cross armv7r-linux-musleabihf-cross)
|
||||||
for i in "${FILES[@]}"; do
|
for i in "${FILES[@]}"; do
|
||||||
@ -259,31 +265,34 @@ BuildReleaseFreeBSD() {
|
|||||||
|
|
||||||
MakeRelease() {
|
MakeRelease() {
|
||||||
cd build
|
cd build
|
||||||
|
if [ -d compress ]; then
|
||||||
|
rm -rv compress
|
||||||
|
fi
|
||||||
mkdir compress
|
mkdir compress
|
||||||
for i in $(find . -type f -name "$appName-linux-*"); do
|
for i in $(find . -type f -name "$appName-linux-*"); do
|
||||||
cp "$i" alist
|
cp "$i" "$appName"
|
||||||
tar -czvf compress/"$i".tar.gz alist
|
tar -czvf compress/"$i".tar.gz "$appName"
|
||||||
rm -f alist
|
rm -f "$appName"
|
||||||
done
|
done
|
||||||
for i in $(find . -type f -name "$appName-android-*"); do
|
for i in $(find . -type f -name "$appName-android-*"); do
|
||||||
cp "$i" alist
|
cp "$i" "$appName"
|
||||||
tar -czvf compress/"$i".tar.gz alist
|
tar -czvf compress/"$i".tar.gz "$appName"
|
||||||
rm -f alist
|
rm -f "$appName"
|
||||||
done
|
done
|
||||||
for i in $(find . -type f -name "$appName-darwin-*"); do
|
for i in $(find . -type f -name "$appName-darwin-*"); do
|
||||||
cp "$i" alist
|
cp "$i" "$appName"
|
||||||
tar -czvf compress/"$i".tar.gz alist
|
tar -czvf compress/"$i".tar.gz "$appName"
|
||||||
rm -f alist
|
rm -f "$appName"
|
||||||
done
|
done
|
||||||
for i in $(find . -type f -name "$appName-freebsd-*"); do
|
for i in $(find . -type f -name "$appName-freebsd-*"); do
|
||||||
cp "$i" alist
|
cp "$i" "$appName"
|
||||||
tar -czvf compress/"$i".tar.gz alist
|
tar -czvf compress/"$i".tar.gz "$appName"
|
||||||
rm -f alist
|
rm -f "$appName"
|
||||||
done
|
done
|
||||||
for i in $(find . -type f -name "$appName-windows-*"); do
|
for i in $(find . -type f -name "$appName-windows-*"); do
|
||||||
cp "$i" alist.exe
|
cp "$i" "$appName".exe
|
||||||
zip compress/$(echo $i | sed 's/\.[^.]*$//').zip alist.exe
|
zip compress/$(echo $i | sed 's/\.[^.]*$//').zip "$appName".exe
|
||||||
rm -f alist.exe
|
rm -f "$appName".exe
|
||||||
done
|
done
|
||||||
cd compress
|
cd compress
|
||||||
find . -type f -print0 | xargs -0 md5sum >"$1"
|
find . -type f -print0 | xargs -0 md5sum >"$1"
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
version: '3.3'
|
version: '3.3'
|
||||||
services:
|
services:
|
||||||
alist:
|
openlist:
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- '/etc/alist:/opt/alist/data'
|
- '/etc/openlist:/opt/openlist/data'
|
||||||
ports:
|
ports:
|
||||||
- '5244:5244'
|
- '5244:5244'
|
||||||
- '5245:5245'
|
- '5245:5245'
|
||||||
@ -12,5 +12,5 @@ services:
|
|||||||
- PGID=0
|
- PGID=0
|
||||||
- UMASK=022
|
- UMASK=022
|
||||||
- TZ=UTC
|
- TZ=UTC
|
||||||
container_name: alist
|
container_name: openlist
|
||||||
image: 'xhofe/alist:latest'
|
image: 'ghcr.io/openlistteam/openlist:latest'
|
||||||
|
@ -11,7 +11,7 @@ type Addition struct {
|
|||||||
RefreshToken string `json:"refresh_token" required:"true"`
|
RefreshToken string `json:"refresh_token" required:"true"`
|
||||||
OrderBy string `json:"order_by" type:"select" options:"name,size,updated_at,created_at"`
|
OrderBy string `json:"order_by" type:"select" options:"name,size,updated_at,created_at"`
|
||||||
OrderDirection string `json:"order_direction" type:"select" options:"ASC,DESC"`
|
OrderDirection string `json:"order_direction" type:"select" options:"ASC,DESC"`
|
||||||
OauthTokenURL string `json:"oauth_token_url" default:"https://api.nn.ci/alist/ali_open/token"`
|
OauthTokenURL string `json:"oauth_token_url" default:"https://example.com/alist/ali_open/token"` // TODO: Replace this with a community hosted api endpoint
|
||||||
ClientID string `json:"client_id" required:"false" help:"Keep it empty if you don't have one"`
|
ClientID string `json:"client_id" required:"false" help:"Keep it empty if you don't have one"`
|
||||||
ClientSecret string `json:"client_secret" required:"false" help:"Keep it empty if you don't have one"`
|
ClientSecret string `json:"client_secret" required:"false" help:"Keep it empty if you don't have one"`
|
||||||
RemoveWay string `json:"remove_way" required:"true" type:"select" options:"trash,delete"`
|
RemoveWay string `json:"remove_way" required:"true" type:"select" options:"trash,delete"`
|
||||||
|
@ -11,7 +11,7 @@ type Addition struct {
|
|||||||
IsSharepoint bool `json:"is_sharepoint"`
|
IsSharepoint bool `json:"is_sharepoint"`
|
||||||
ClientID string `json:"client_id" required:"true"`
|
ClientID string `json:"client_id" required:"true"`
|
||||||
ClientSecret string `json:"client_secret" required:"true"`
|
ClientSecret string `json:"client_secret" required:"true"`
|
||||||
RedirectUri string `json:"redirect_uri" required:"true" default:"https://alist.nn.ci/tool/onedrive/callback"`
|
RedirectUri string `json:"redirect_uri" required:"true" default:"https://api.oplist.org/onedrive/callback"`
|
||||||
RefreshToken string `json:"refresh_token" required:"true"`
|
RefreshToken string `json:"refresh_token" required:"true"`
|
||||||
SiteId string `json:"site_id"`
|
SiteId string `json:"site_id"`
|
||||||
ChunkSize int64 `json:"chunk_size" type:"number" default:"5"`
|
ChunkSize int64 `json:"chunk_size" type:"number" default:"5"`
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
umask ${UMASK}
|
umask ${UMASK}
|
||||||
|
|
||||||
if [ "$1" = "version" ]; then
|
if [ "$1" = "version" ]; then
|
||||||
./alist version
|
./openlist version
|
||||||
else
|
else
|
||||||
if [ "$RUN_ARIA2" = "true" ]; then
|
if [ "$RUN_ARIA2" = "true" ]; then
|
||||||
chown -R ${PUID}:${PGID} /opt/aria2/
|
chown -R ${PUID}:${PGID} /opt/aria2/
|
||||||
@ -14,6 +14,6 @@ else
|
|||||||
>/dev/null 2>&1 &
|
>/dev/null 2>&1 &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chown -R ${PUID}:${PGID} /opt/alist/
|
chown -R ${PUID}:${PGID} /opt/openlist/
|
||||||
exec su-exec ${PUID}:${PGID} ./alist server --no-prefix
|
exec su-exec ${PUID}:${PGID} ./openlist server --no-prefix
|
||||||
fi
|
fi
|
@ -155,7 +155,7 @@ func InitialSettings() []model.SettingItem {
|
|||||||
([[:xdigit:]]{1,4}(?::[[:xdigit:]]{1,4}){7}|::|:(?::[[:xdigit:]]{1,4}){1,6}|[[:xdigit:]]{1,4}:(?::[[:xdigit:]]{1,4}){1,5}|(?:[[:xdigit:]]{1,4}:){2}(?::[[:xdigit:]]{1,4}){1,4}|(?:[[:xdigit:]]{1,4}:){3}(?::[[:xdigit:]]{1,4}){1,3}|(?:[[:xdigit:]]{1,4}:){4}(?::[[:xdigit:]]{1,4}){1,2}|(?:[[:xdigit:]]{1,4}:){5}:[[:xdigit:]]{1,4}|(?:[[:xdigit:]]{1,4}:){1,6}:)
|
([[:xdigit:]]{1,4}(?::[[:xdigit:]]{1,4}){7}|::|:(?::[[:xdigit:]]{1,4}){1,6}|[[:xdigit:]]{1,4}:(?::[[:xdigit:]]{1,4}){1,5}|(?:[[:xdigit:]]{1,4}:){2}(?::[[:xdigit:]]{1,4}){1,4}|(?:[[:xdigit:]]{1,4}:){3}(?::[[:xdigit:]]{1,4}){1,3}|(?:[[:xdigit:]]{1,4}:){4}(?::[[:xdigit:]]{1,4}){1,2}|(?:[[:xdigit:]]{1,4}:){5}:[[:xdigit:]]{1,4}|(?:[[:xdigit:]]{1,4}:){1,6}:)
|
||||||
(?U)access_token=(.*)&`,
|
(?U)access_token=(.*)&`,
|
||||||
Type: conf.TypeText, Group: model.GLOBAL, Flag: model.PRIVATE},
|
Type: conf.TypeText, Group: model.GLOBAL, Flag: model.PRIVATE},
|
||||||
{Key: conf.OcrApi, Value: "https://api.nn.ci/ocr/file/json", Type: conf.TypeString, Group: model.GLOBAL},
|
{Key: conf.OcrApi, Value: "https://api.nn.ci/ocr/file/json", Type: conf.TypeString, Group: model.GLOBAL}, // TODO: This can be replace by a community-hosted endpoint, see https://github.com/xhofe/ocr_api_server
|
||||||
{Key: conf.FilenameCharMapping, Value: `{"/": "|"}`, Type: conf.TypeText, Group: model.GLOBAL},
|
{Key: conf.FilenameCharMapping, Value: `{"/": "|"}`, Type: conf.TypeText, Group: model.GLOBAL},
|
||||||
{Key: conf.ForwardDirectLinkParams, Value: "false", Type: conf.TypeBool, Group: model.GLOBAL},
|
{Key: conf.ForwardDirectLinkParams, Value: "false", Type: conf.TypeBool, Group: model.GLOBAL},
|
||||||
{Key: conf.IgnoreDirectLinkParams, Value: "sign,alist_ts", Type: conf.TypeString, Group: model.GLOBAL},
|
{Key: conf.IgnoreDirectLinkParams, Value: "sign,alist_ts", Type: conf.TypeString, Group: model.GLOBAL},
|
||||||
|
@ -19,7 +19,7 @@ const (
|
|||||||
ADMIN
|
ADMIN
|
||||||
)
|
)
|
||||||
|
|
||||||
const StaticHashSalt = "https://github.com/alist-org/alist"
|
const StaticHashSalt = "https://github.com/OpenListTeam/OpenList"
|
||||||
|
|
||||||
type User struct {
|
type User struct {
|
||||||
ID uint `json:"id" gorm:"primaryKey"` // unique key
|
ID uint `json:"id" gorm:"primaryKey"` // unique key
|
||||||
@ -177,5 +177,5 @@ func (u *User) WebAuthnCredentials() []webauthn.Credential {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (u *User) WebAuthnIcon() string {
|
func (u *User) WebAuthnIcon() string {
|
||||||
return "https://alist.nn.ci/logo.svg"
|
return "https://jsd.nn.ci/gh/alist-org/logo@main/logo.svg"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user