增加在添加语义化版本tag时自动生成static并构建多个不同tag的容器的workflow,简化版本发布流程 (#888)

This commit is contained in:
风之凌殇
2021-11-12 21:54:42 +08:00
committed by GitHub
parent 65691cf7c9
commit bee1f9968e
2 changed files with 124 additions and 6 deletions
+11 -6
View File
@@ -1,14 +1,19 @@
FROM node:lts-alpine
LABEL maintainer="whyour"
ARG QL_URL=https://github.com/whyour/qinglong.git
ARG QL_MAINTAINER="whyour"
LABEL maintainer="${QL_MAINTAINER}"
ARG QL_URL=https://github.com/${QL_MAINTAINER}/qinglong.git
ARG QL_BRANCH=master
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
LANG=zh_CN.UTF-8 \
SHELL=/bin/bash \
PS1="\u@\h:\w \$ " \
QL_DIR=/ql
QL_DIR=/ql \
QL_MAINTAINER=${QL_MAINTAINER} \
QL_URL=${QL_URL} \
QL_BRANCH=${QL_BRANCH}
WORKDIR ${QL_DIR}
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \
RUN set -x \
&& sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \
&& apk update -f \
&& apk upgrade \
&& apk --no-cache add -f bash \
@@ -42,7 +47,7 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/re
&& rm -rf /root/.npm \
&& pnpm install --prod \
&& rm -rf /root/.pnpm-store \
&& git clone -b ${QL_BRANCH} https://github.com/whyour/qinglong-static.git /static \
&& git clone -b ${QL_BRANCH} https://github.com/${QL_MAINTAINER}/qinglong-static.git /static \
&& cp -rf /static/* ${QL_DIR} \
&& rm -rf /static
ENTRYPOINT ["./docker/docker-entrypoint.sh"]
ENTRYPOINT ["./docker/docker-entrypoint.sh"]