mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-25 01:43:27 +08:00
Fix use secrets gitee token (#17297)
### Summary 1. use secrets gitee token 2. add gitee token to dockerfile 3. modify pull_request to pull_request_target
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -50,9 +50,15 @@ RUN --mount=type=cache,id=ragflow_apt,target=/var/cache/apt,sharing=locked \
|
||||
fonts-freefont-ttf fonts-noto-cjk postgresql-client
|
||||
|
||||
# Download resource from GitHub to /usr/share/infinity
|
||||
RUN mkdir -p /usr/share/infinity/resource && \
|
||||
RUN --mount=type=secret,id=gitee_token \
|
||||
mkdir -p /usr/share/infinity/resource && \
|
||||
if [ "$NEED_MIRROR" == "1" ]; then \
|
||||
git clone --depth 1 --single-branch https://gitee.com/infiniflow/resource /tmp/resource; \
|
||||
GITEE_TOKEN=$(cat /run/secrets/gitee_token 2>/dev/null || echo ""); \
|
||||
if [ -n "$GITEE_TOKEN" ]; then \
|
||||
git clone --depth 1 --single-branch "https://oauth2:${GITEE_TOKEN}@gitee.com/infiniflow/resource" /tmp/resource; \
|
||||
else \
|
||||
git clone --depth 1 --single-branch https://github.com/infiniflow/resource.git /tmp/resource; \
|
||||
fi; \
|
||||
else \
|
||||
git clone --depth 1 --single-branch https://github.com/infiniflow/resource.git /tmp/resource; \
|
||||
fi && \
|
||||
|
||||
Reference in New Issue
Block a user