From 894f8a8f7cf82b0ece5db86884f831faea9b6127 Mon Sep 17 00:00:00 2001 From: TangHuan Date: Tue, 6 May 2025 11:48:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=93=E5=BA=93=E5=9C=B0?= =?UTF-8?q?=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/dev.yaml | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/dev.yaml b/.gitea/workflows/dev.yaml index 14c76a4..c82d1d0 100644 --- a/.gitea/workflows/dev.yaml +++ b/.gitea/workflows/dev.yaml @@ -9,15 +9,26 @@ jobs: ACTIONS_RUNNER_DEBUG: true steps: - name: 克隆代码 - uses: https://git.pintantan.com/actions/checkout@v4 + uses: actions/checkout@v4 +# 缓存 Maven 依赖 +# - name: Cache Jdk download +# uses: https://gitea.com/actions/cache@v3 +# with: +# path: $RUNNER_TEMP/java_package.tar.gz +# key: ${{ runner.os }}-jdk-17.0.14 +# restore-keys: ${{ runner.os }}-jdk-17.0.14 +# +# - name: 下载jdk +# run: | +# download_url="https://mirrors.tuna.tsinghua.edu.cn/Adoptium/17/jdk/x64/linux/OpenJDK17U-jdk_x64_linux_hotspot_17.0.14_7.tar.gz" +# wget -O $RUNNER_TEMP/java_package.tar.gz $download_url - - uses: https://git.pintantan.com/actions/setup-node@v4 + - uses: actions/setup-node@v4 with: # Version Spec of the version to use in SemVer notation. # It also admits such aliases as lts/*, latest, nightly and canary builds # Examples: 12.x, 10.15.1, >=10.15.0, lts/Hydrogen, 16-nightly, latest, node - - node-version: '14' + node-version: 'node' cache: "npm" # 缓存 Maven 依赖 @@ -27,3 +38,18 @@ jobs: - name: 编译 run: npm run build + - name: Login to Gitea Container Registry + uses: docker/login-action@v2 + with: + registry: git.pintantan.com + username: ${{ vars.DOCKER_USERNAME }} + password: ${{ vars.DOCKER_PASSWORD }} + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: git.pintantan.com/${{gitea.repository}}:demo-1.0.0 + +