Compare commits

..

6 Commits
main ... dev

Author SHA1 Message Date
liubocheng 74cc9d7436 dev:修改返回码
Deploy to Test / deploy (push) Successful in 47s Details
2025-04-01 00:49:14 +08:00
liubocheng a160159f1f dev:修改组
Deploy to Test / deploy (push) Successful in 34s Details
2025-04-01 00:47:40 +08:00
liubocheng 31fc538f0f 1
Deploy to Test / deploy (push) Has been cancelled Details
2025-04-01 00:40:20 +08:00
liubocheng 6b9d9e604e 不更新
Deploy to Test / deploy (push) Failing after 7s Details
2025-04-01 00:35:13 +08:00
liubocheng 4d94b3cbdb dev:还原
Deploy to Test / deploy (push) Failing after 9s Details
2025-04-01 00:27:40 +08:00
liubocheng 2355a1a4dd dev:修改
Deploy to Test / deploy (push) Failing after 7s Details
2025-04-01 00:22:24 +08:00
4 changed files with 11 additions and 22 deletions

View File

@ -1,7 +1,7 @@
name: Deploy to Test
on:
push:
branches: [main]
branches: [dev]
jobs:
deploy:
@ -10,22 +10,17 @@ jobs:
steps:
- name: Checkout code
uses: https://gitea.com/actions/checkout@v4
uses: actions/checkout@v4
with:
# 指定分支、标签或提交哈希
ref: main
ref: dev
# 拉取深度(节省时间与带宽)
fetch-depth: 0 # 0 表示拉取完整的历史
- name: Replace Debian APT sources
run: |
tee /etc/apt/sources.list <<EOF
# 清华大学 Debian 11 Bullseye 镜像
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
EOF
sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list \
&& sed -i 's/security.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
- name: Install SSH tools
run: |

View File

@ -1,11 +1,7 @@
version: '3.8'
version: '3.8'
services:
php:
build:
context: .
args:
USER_ID: "1001"
GROUP_ID: "1001"
build: . # 指向 Dockerfile 目录
volumes:
- /data/laravel_test:/var/www/html
working_dir: /var/www/html

View File

@ -1,8 +1,4 @@
FROM php:7.3-fpm
ARG USER_ID
ARG GROUP_ID
RUN echo "USER_ID: ${USER_ID}"
FROM php:7.3-fpm
# 替换为清华大学镜像源Debian 10 Buster
RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list \
@ -20,6 +16,8 @@ RUN curl -sS https://getcomposer.org/installer | php -- \
--filename=composer
# 创建非 root 用户(推荐与宿主机用户 UID/GID 一致)
ARG USER_ID=1001 # 宿主机 deploy-user 的 UID
ARG GROUP_ID=1001 # 宿主机 deploy-user 的 GID
RUN groupadd -g ${GROUP_ID} appuser \
&& useradd -u ${USER_ID} -g appuser -m -d /home/appuser -s /bin/bash appuser

View File

@ -18,5 +18,5 @@ Route::middleware('auth:api')->get('/user', function (Request $request) {
});
Route::get('/test', function () {
return ["msg" => "success", "data" => [], "status" => 0];
return ["msg" => "success", "data" => [], "status" => 200];
});