|
|
@@ -7,24 +7,23 @@ on:
|
|
|
jobs:
|
|
|
build-and-push:
|
|
|
runs-on: ubuntu-latest
|
|
|
+ container:
|
|
|
+ image: docker.1ms.run/node:20-alpine # 使用包含 Node.js 的官方镜像
|
|
|
steps:
|
|
|
-
|
|
|
- # 第一步:安装 Node.js(解决 checkou 动作依赖)
|
|
|
- - name: Set up Node.js
|
|
|
- uses: https://gitee.com/zyh320888/setup-node@v4
|
|
|
- with:
|
|
|
- node-version: '20' # 指定 Node.js 版本(推荐 18 或 20,按需调整)
|
|
|
- cache: 'npm' # 可选:缓存 npm 依赖,加速后续步骤
|
|
|
- run: echo "🎉 该作业由 ${{ gitea.event_name }} 事件自动触发。"
|
|
|
- run: echo "🐧 此作业当前在 Gitea 托管的 ${{ runner.os }} 服务器上运行!"
|
|
|
- run: echo "🔎 您的标签名称是 ${{ gitea.ref_name }},仓库是 ${{ gitea.repository }}。"
|
|
|
+
|
|
|
- name: 检出仓库代码
|
|
|
uses: https://gitee.com/zyh320888/checkout@v4
|
|
|
+
|
|
|
- run: echo "💡 ${{ gitea.repository }} 仓库已克隆到运行器。"
|
|
|
- run: echo "🖥️ 工作流现在已准备好在运行器上测试您的代码。"
|
|
|
+
|
|
|
- name: 列出仓库中的文件
|
|
|
run: |
|
|
|
ls ${{ gitea.workspace }}
|
|
|
+
|
|
|
- run: echo "🍏 此作业的状态是 ${{ job.status }}。"
|
|
|
|
|
|
- name: 设置 Docker Buildx
|