33344
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 6s

This commit is contained in:
编码猿
2025-10-05 02:16:12 +08:00
parent e37cb7ba2c
commit 7acf000234
2 changed files with 95 additions and 68 deletions

View File

@@ -1,19 +1,44 @@
# 工作流名称
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
# 运行名称在Gitea界面中显示的具体运行名称支持动态变量
run-name: ${{ gitea.actor }} 正在测试 Gitea Actions 🚀
# 触发条件当发生push事件时触发
on: [push]
# 作业定义
jobs:
# 作业名称探索Gitea Actions
Explore-Gitea-Actions:
# 运行环境在ubuntu-latest标签的runner上运行
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
# 步骤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
- 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
# 步骤5输出克隆完成信息
- run: echo "💡 ${{ gitea.repository }} 仓库已克隆到runner。"
# 步骤6准备测试提示
- run: echo "🖥️ 工作流现已准备好在runner上测试您的代码。"
# 步骤7列出仓库文件多行命令
- name: 列出仓库中的文件
run: |
ls ${{ gitea.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."
# 步骤8输出作业状态
- run: echo "🍏 此作业的状态是 ${{ job.status }}。"