From 96666dd58dd350da36971884ad01f6a0f76e89b1 Mon Sep 17 00:00:00 2001 From: qxa Date: Fri, 14 Jun 2024 11:00:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E5=B8=83=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/push-dev.yaml | 14 +++++--------- .gitea/workflows/push-master.yaml | 13 ++++++------- .gitea/workflows/push-staging.yaml | 8 +++++--- .gitea/workflows/release-version.yaml | 13 +++++-------- docker-swarm.yaml | 4 ++-- 5 files changed, 23 insertions(+), 29 deletions(-) diff --git a/.gitea/workflows/push-dev.yaml b/.gitea/workflows/push-dev.yaml index 68c77bd..dad32f8 100644 --- a/.gitea/workflows/push-dev.yaml +++ b/.gitea/workflows/push-dev.yaml @@ -6,8 +6,8 @@ on: - develop env: - IMAGE_NAME: ${{ gitea.repository_owner }}/usercenter.web - PUBLISH_PATH: usercenter.web + IMAGE_NAME: ${{ gitea.repository_owner }}/maketemplate.web + PUBLISH_PATH: maketemplate.web PUBLISH_HOST: 10.255.255.44 PUBLISH_PORT: 22 PUBLISH_REPLICAS: 1 #启动副本数量 @@ -16,21 +16,17 @@ jobs: job1: name: 编译发布 runs-on: linux - container: - image: node:16-bullseye - volumes: - #挂载缓存 - - /opt/.runner/node_modules:/cache - steps: - name: 下载源码 - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 使用缓存 uses: actions/cache@master with: mount: | node_modules + hash_files: | + package.json - name: 编译项目 run: | diff --git a/.gitea/workflows/push-master.yaml b/.gitea/workflows/push-master.yaml index a3542ac..c9c824d 100644 --- a/.gitea/workflows/push-master.yaml +++ b/.gitea/workflows/push-master.yaml @@ -6,8 +6,8 @@ on: - master env: - IMAGE_NAME: ${{ gitea.repository_owner }}/usercenter.web - PUBLISH_PATH: usercenter.web + IMAGE_NAME: ${{ gitea.repository_owner }}/maketemplate.web + PUBLISH_PATH: maketemplate.web PUBLISH_HOST: 10.255.255.74 PUBLISH_PORT: 10022 PUBLISH_REPLICAS: 1 #启动副本数量 @@ -21,7 +21,7 @@ jobs: steps: - name: 下载源码 - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 发布版本 id: publish_version @@ -33,16 +33,15 @@ jobs: needs: release steps: - name: 下载源码 - uses: actions/checkout@v3 - - - name: 下载源码 - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 使用缓存 uses: actions/cache@master with: mount: | node_modules + hash_files: | + package.json - name: 编译项目 shell: bash diff --git a/.gitea/workflows/push-staging.yaml b/.gitea/workflows/push-staging.yaml index 60307f5..937cdba 100644 --- a/.gitea/workflows/push-staging.yaml +++ b/.gitea/workflows/push-staging.yaml @@ -6,8 +6,8 @@ on: - staging env: - IMAGE_NAME: ${{ gitea.repository_owner }}/usercenter.web - PUBLISH_PATH: usercenter.web + IMAGE_NAME: ${{ gitea.repository_owner }}/maketemplate.web + PUBLISH_PATH: maketemplate.web PUBLISH_HOST: 10.255.255.3 PUBLISH_PORT: 22 PUBLISH_REPLICAS: 1 #启动副本数量 @@ -24,13 +24,15 @@ jobs: steps: - name: 下载源码 - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 使用缓存 uses: actions/cache@master with: mount: | node_modules + hash_files: | + package.json - name: 编译项目 shell: bash diff --git a/.gitea/workflows/release-version.yaml b/.gitea/workflows/release-version.yaml index 8418477..cbe6930 100644 --- a/.gitea/workflows/release-version.yaml +++ b/.gitea/workflows/release-version.yaml @@ -6,8 +6,8 @@ on: - published env: - IMAGE_NAME: ${{ gitea.repository_owner }}/usercenter.web - PUBLISH_PATH: usercenter.web + IMAGE_NAME: ${{ gitea.repository_owner }}/maketemplate.web + PUBLISH_PATH: maketemplate.web PUBLISH_HOST: 10.255.255.74 PUBLISH_PORT: 10022 PUBLISH_REPLICAS: 1 #启动副本数量 @@ -16,21 +16,18 @@ jobs: job1: name: 编译发布 runs-on: linux - container: - image: node:16-bullseye - volumes: - #挂载缓存 - - /opt/.runner/node_modules:/cache steps: - name: 下载源码 - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 使用缓存 uses: actions/cache@master with: mount: | node_modules + hash_files: | + package.json - name: 编译项目 shell: bash diff --git a/docker-swarm.yaml b/docker-swarm.yaml index bd0913f..51342a5 100644 --- a/docker-swarm.yaml +++ b/docker-swarm.yaml @@ -2,12 +2,12 @@ version: "3" services: usercenter-web: - image: ${REGISTRY:-harbor.w.23544.com:8843}/marking/usercenter.web:${TAG:-latest} + image: ${REGISTRY:-harbor.w.23544.com:8843}/marking/maketemplate.web:${TAG:-latest} hostname: marking environment: TZ: Asia/Shanghai ports: - - 4400:80 + - 8898:80 deploy: mode: replicated replicas: ${REPLICAS:-1}