From f6ec72b7753168b7409f27dfa02e0d9506270729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BC=96=E7=A0=81=E7=8C=BF?= Date: Sun, 5 Oct 2025 01:03:30 +0800 Subject: [PATCH] 333 --- .gitea/workflows/build.yml | 16 ++++++++-------- .gitea/workflows/test.yml | 36 ++++++++++++++++++------------------ docker-compose.yml | 7 +++---- 3 files changed, 29 insertions(+), 30 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 1d5e128..b798bce 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -1,7 +1,7 @@ # .gitea/workflows/build.yml # 1. 工作流名称 -name: Build Vue3 App +name: 构建项目 # 2. 触发条件 (on) on: @@ -12,33 +12,33 @@ on: # 3. 作业定义 (jobs) jobs: - build: + 构建: # 4. 运行器选择 (runs-on) - runs-on: node:18 + runs-on: ubuntu-latest # 5. 步骤序列 (steps) steps: # 步骤 1: 检出代码 - - name: Checkout code + - name: 检出代码 uses: actions/checkout@v4 # 步骤 2: 设置 Node.js 环境 - - name: Setup Node.js + - name: 设置 Node.js 环境 uses: actions/setup-node@v4 with: node-version: 18 cache: 'npm' # 步骤 3: 安装依赖 - - name: Install dependencies + - name: 安装依赖 run: npm ci # 步骤 4: 执行打包命令 - - name: Build + - name: 执行Build构建 run: npm run build # 步骤 5: 上传打包产物 - - name: Upload dist + - name: 上传构建产物 uses: actions/upload-artifact@v4 with: name: dist diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 394c807..e7887ee 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -1,19 +1,19 @@ -name: Gitea Actions Demo -run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 -on: [push] +# name: Gitea Actions Demo +# run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 +# on: [push] -jobs: - Explore-Gitea-Actions: - runs-on: ubuntu-latest - steps: - - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" - - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." - - name: Check out repository code - uses: actions/checkout@v4 - - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." - - run: echo "🖥️ The workflow is now ready to test your code on the runner." - - name: List files in the repository - run: | - ls ${{ gitea.workspace }} - - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file +# jobs: +# Explore-Gitea-Actions: +# runs-on: ubuntu-latest +# steps: +# - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." +# - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" +# - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." +# - name: Check out repository code +# uses: actions/checkout@v4 +# - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." +# - run: echo "🖥️ The workflow is now ready to test your code on the runner." +# - name: List files in the repository +# run: | +# ls ${{ gitea.workspace }} +# - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 7744003..98e505a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,12 +8,11 @@ services: volumes: - runner-data:/data - /var/run/docker.sock:/var/run/docker.sock - working_dir: /data # 关键:设置工作目录为卷挂载点 environment: - - GITEA_INSTANCE_URL=https://git.bmycode.help # 你的 Gitea 地址 - - GITEA_RUNNER_REGISTRATION_TOKEN=ipofHSVd0Hv3vWPplrxw7qKJteXYYfqfl9dCWIfj + - GITEA_INSTANCE_URL=https://git.bmycode.help + - GITEA_RUNNER_REGISTRATION_TOKEN=WFiO5JDwz7CHnk7fMGJYMcSITU81CLXuI7Ofg10e - GITEA_RUNNER_LABELS=ubuntu-latest:docker://node:24-alpine - - GITEA_RUNNER_NAME=my-vue-app-runner + - GITEA_RUNNER_NAME=ci操作 networks: - gitea-actions-network