Files
gitea_actions/.gitea/workflows/test.yml
编码猿 7acf000234
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 6s
33344
2025-10-05 02:16:12 +08:00

44 lines
1.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 工作流名称
name: Gitea Actions Demo
# 运行名称:在Gitea界面中显示的具体运行名称,支持动态变量
run-name: ${{ gitea.actor }} 正在测试 Gitea Actions 🚀
# 触发条件:当发生push事件时触发
on: [push]
# 作业定义
jobs:
# 作业名称:探索Gitea Actions
Explore-Gitea-Actions:
# 运行环境:在ubuntu-latest标签的runner上运行
runs-on: ubuntu-latest
# 步骤序列
steps:
# 步骤1:输出事件信息
- run: echo "🎉 该作业由 ${{ gitea.event_name }} 事件自动触发。"
# 步骤2:输出运行环境信息
- run: echo "🐧 该作业现在正在Gitea托管的 ${{ runner.os }} 服务器上运行!"
# 步骤3:输出分支和仓库信息
- run: echo "🔎 您的分支名称是 ${{ gitea.ref }},您的仓库是 ${{ gitea.repository }}。"
# 步骤4:检出仓库代码(具有名称的步骤)
- name: 检出仓库代码
uses: actions/checkout@v4
# 步骤5:输出克隆完成信息
- run: echo "💡 ${{ gitea.repository }} 仓库已克隆到runner。"
# 步骤6:准备测试提示
- run: echo "🖥️ 工作流现已准备好在runner上测试您的代码。"
# 步骤7:列出仓库文件(多行命令)
- name: 列出仓库中的文件
run: |
ls ${{ gitea.workspace }}
# 步骤8:输出作业状态
- run: echo "🍏 此作业的状态是 ${{ job.status }}。"