From deebdde0c3497df7f06dfd968aff0cb223b79da8 Mon Sep 17 00:00:00 2001 From: xkrfer Date: Sun, 1 May 2022 20:19:33 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20=E6=9B=B4=E6=8D=A2=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker-image.yml | 2 ++ .gitignore | 1 + Dockerfile | 6 ++---- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index b0f4a52..5bd0410 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -2,6 +2,8 @@ name: Publish Docker image on: push: + branches: + - main tags: - v* diff --git a/.gitignore b/.gitignore index c2d0b97..3d705fe 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ lerna-debug.log* !.vscode/launch.json !.vscode/extensions.json +/docker/push/gorush diff --git a/Dockerfile b/Dockerfile index d682cd5..9c253a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,6 @@ WORKDIR / RUN git clone https://github.com/appleboy/gorush.git --depth=1 \ && go env -w GO111MODULE=on \ - && go env -w GOPROXY=https://goproxy.cn,direct \ && cd gorush \ && go install \ && go build -o ./bin/gorush @@ -15,7 +14,7 @@ WORKDIR /app COPY package.json . -RUN npm install --registry=https://registry.npmmirror.com +RUN npm install COPY . . @@ -33,8 +32,7 @@ COPY --from=gorush /gorush/bin/gorush push/gorush COPY package.json . -RUN npm config set registry https://registry.npmmirror.com \ - && npm install --production \ +RUN npm install --production \ && npm install -g pm2 \ && apk update \ && apk upgrade \