Files
action_test/.gitea/workflows/test.yml
2025-07-12 12:37:21 +08:00

38 lines
992 B
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: 简单测试
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: 检出代码
uses: actions/checkout@v4
- name: 基本测试
run: |
echo "🚀 开始测试..."
echo "📁 当前目录: $(pwd)"
echo "📋 文件列表:"
ls -la
echo "✅ 测试完成!"
- name: 设置Docker构造环境
uses: docker/setup-buildx-action@v3
- name: 构造Node.js Hello World程序
run: |
echo "🐳 构造Node.js Hello World程序..."
cat << 'EOF' > Dockerfile
FROM node:18-alpine
WORKDIR /app
RUN echo '{"name": "hello-world", "version": "1.0.0", "main": "app.js"}' > package.json
RUN echo 'console.log("Hello World from Node.js Docker! 🎉")' > app.js
CMD ["node", "app.js"]
EOF
docker build -t nodejs-hello-world:latest .
echo "✅ Node.js Hello World镜像构造完成"