From 30a0e23bc4d7106d4606ed1f7e8303026583f8a3 Mon Sep 17 00:00:00 2001 From: adminroot Date: Thu, 11 Sep 2025 22:42:39 -0700 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/update-ru?= =?UTF-8?q?les.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/update-rules.yml | 96 +++---------------------------- 1 file changed, 8 insertions(+), 88 deletions(-) diff --git a/.gitea/workflows/update-rules.yml b/.gitea/workflows/update-rules.yml index fe5e999..2e9e847 100644 --- a/.gitea/workflows/update-rules.yml +++ b/.gitea/workflows/update-rules.yml @@ -1,99 +1,19 @@ -name: Test Act Runner +name: Basic Test -# 触发条件 on: push: - branches: [ main, master ] - pull_request: - branches: [ main, master ] - # 支持手动触发 workflow_dispatch: jobs: - test-basic: - name: 基础功能测试 + test: runs-on: ubuntu-latest steps: - # 1. 检出代码 - - name: 检出代码 - uses: actions/checkout@v3 + - name: Hello World + run: echo "Hello from Gitea Act Runner!" - # 2. 系统信息 - - name: 显示系统信息 + - name: System Info run: | - echo "=== 系统信息 ===" - uname -a - echo "=== 工作目录 ===" - pwd - ls -la - echo "=== 环境变量 ===" - env | sort - - # 3. 测试基本命令 - - name: 测试基本命令 - run: | - echo "Hello from Gitea Act Runner!" - date - whoami - - # 4. 创建测试文件 - - name: 创建测试文件 - run: | - echo "Act Runner 测试成功!" > test-file.txt - echo "当前时间: $(date)" >> test-file.txt - cat test-file.txt - - # 5. 测试多行脚本 - - name: 多行脚本测试 - run: | - for i in {1..5}; do - echo "第 $i 次循环" - done - - test-matrix: - name: 矩阵构建测试 - runs-on: ubuntu-latest - strategy: - matrix: - version: ['1.0', '2.0', '3.0'] - - steps: - - name: 矩阵测试 - 版本 ${{ matrix.version }} - run: | - echo "正在测试版本: ${{ matrix.version }}" - echo "构建完成" - - test-conditions: - name: 条件执行测试 - runs-on: ubuntu-latest - - steps: - - name: 检出代码 - uses: actions/checkout@v3 - - - name: 条件执行 - 总是执行 - if: always() - run: echo "这个步骤总是会执行" - - - name: 条件执行 - 成功时执行 - if: success() - run: echo "前面的步骤都成功了" - - test-artifacts: - name: 文件传输测试 - runs-on: ubuntu-latest - - steps: - - name: 创建测试文件 - run: | - mkdir -p test-output - echo "测试内容" > test-output/result.txt - echo "构建时间: $(date)" > test-output/build-info.txt - - - name: 上传构建产物 - uses: actions/upload-artifact@v3 - with: - name: test-artifacts - path: test-output/ - retention-days: 1 \ No newline at end of file + echo "当前时间: $(date)" + echo "工作目录: $(pwd)" + echo "用户: $(whoami)" \ No newline at end of file