mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-22 22:36:06 +08:00
增加dust仓库秘钥
This commit is contained in:
parent
947a753610
commit
c2964ec1bb
10
.github/workflows/docker.yml
vendored
10
.github/workflows/docker.yml
vendored
|
@ -30,9 +30,11 @@ jobs:
|
|||
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
|
||||
|
||||
- name: Docker buildx image and push on master branch
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: |
|
||||
docker buildx build --output "type=image,push=true" --platform=linux/amd64,linux/arm/v7,linux/arm64 --tag whyour/qinglong:latest docker/
|
||||
docker buildx build --build-arg SSH_PRIVATE_KEY="${SSH_PRIVATE_KEY}" --output "type=image,push=true" --platform=linux/amd64,linux/arm/v7,linux/arm64 --tag whyour/qinglong:latest docker/
|
||||
|
||||
- name: Replace tag without `v`
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
|
@ -44,7 +46,9 @@ jobs:
|
|||
result-encoding: string
|
||||
|
||||
- name: Docker buildx image and push on release
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
run: |
|
||||
docker buildx build --output "type=image,push=true" --platform=linux/amd64,linux/arm/v7,linux/arm64 --tag whyour/qinglong:${{steps.version.outputs.result}} docker/
|
||||
docker buildx build --output "type=image,push=true" --platform=linux/amd64,linux/arm/v7,linux/arm64 --tag whyour/qinglong:latest docker/
|
||||
docker buildx build --build-arg SSH_PRIVATE_KEY="${SSH_PRIVATE_KEY}" --output "type=image,push=true" --platform=linux/amd64,linux/arm/v7,linux/arm64 --tag whyour/qinglong:${{steps.version.outputs.result}} docker/
|
||||
docker buildx build --build-arg SSH_PRIVATE_KEY="${SSH_PRIVATE_KEY}" --output "type=image,push=true" --platform=linux/amd64,linux/arm/v7,linux/arm64 --tag whyour/qinglong:latest docker/
|
|
@ -2,6 +2,7 @@ FROM node:lts-alpine
|
|||
LABEL maintainer="whyour"
|
||||
ARG QL_BASE_URL=https://github.com.cnpmjs.org/whyour/qinglong
|
||||
ARG QL_BASE_BRANCH=master
|
||||
ARG SSH_PRIVATE_KEY
|
||||
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
|
||||
LANG=zh_CN.UTF-8 \
|
||||
SHELL=/bin/bash \
|
||||
|
@ -15,19 +16,22 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
|||
coreutils \
|
||||
moreutils \
|
||||
git \
|
||||
wget \
|
||||
curl \
|
||||
nano \
|
||||
tzdata \
|
||||
perl \
|
||||
openssl \
|
||||
nginx \
|
||||
python3 \
|
||||
yarn \
|
||||
jq \
|
||||
openssh \
|
||||
&& rm -rf /var/cache/apk/* \
|
||||
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||
&& echo "Asia/Shanghai" > /etc/timezone \
|
||||
&& mkdir -p /root/.ssh \
|
||||
&& chmod 700 /root/.ssh \
|
||||
&& echo -e $SSH_PRIVATE_KEY > /root/.ssh/id_rsa \
|
||||
&& chmod 600 /root/.ssh/id_rsa \
|
||||
&& ssh-keyscan github.com > /root/.ssh/known_hosts \
|
||||
&& touch ~/.bashrc \
|
||||
&& mkdir /run/nginx \
|
||||
&& git clone -b ${QL_BASE_BRANCH} ${QL_BASE_URL} ${QL_DIR} \
|
||||
|
|
|
@ -32,7 +32,10 @@ mkdir -p ${diyscriptsdir}
|
|||
|
||||
if [ ! -d "$diyscriptsdir/${author}_${repo}" ]; then
|
||||
echo -e "${author}本地仓库不存在,从gayhub拉取ing..."
|
||||
cd ${diyscriptsdir} && git clone https://ghproxy.com/https://github.com/${author}/${repo} ${author}_${repo}
|
||||
local url="https://ghproxy.com/https://github.com/${author}/${repo}"
|
||||
if [ $author == "monk-coder" ] && [ $repo == "dust" ]; then
|
||||
url="git@github.com:monk-coder/dust.git"
|
||||
cd ${diyscriptsdir} && git clone $url ${author}_${repo}
|
||||
gitpullstatus=$?
|
||||
[ $gitpullstatus -eq 0 ] && echo -e "${author}本地仓库拉取完毕"
|
||||
[ $gitpullstatus -ne 0 ] && echo -e "${author}本地仓库拉取失败,请检查!" && exit 0
|
||||
|
|
Loading…
Reference in New Issue
Block a user