添加action
All checks were successful
/ build-and-push-blog (push) Successful in 13s

This commit is contained in:
root 2025-04-04 04:57:33 +00:00
parent bd0c05d7b8
commit bf4b174a6c
6 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,17 @@
on: push
jobs:
build-and-push-blog:
runs-on: k3s
container: gitea.limil.top/limil/buildah-ubuntu:latest
steps:
- uses: https://gitea.limil.top/limil/checkout@v3
- run: git ls-files -z | while read -d '' path; do touch -d \"$(git log -1 --format=\"@%ct\" \"$path\")\" \"$path\"; done
- run: buildah login -u limil -p ${{ secrets.REG_PASSWORD }} gitea.limil.top
- run: buildah build --isolation chroot -t gitea.limil.top/limil/resource-site .
- run: buildah push gitea.limil.top/limil/resource-site:latest
# deloyment-blog:
# runs-on: k3s
# container: gitea.limil.top/limil/kubectl:latest
# steps:
# - run: kubectl rollout restart deployment/blog

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM gitea.limil.top/limil/nginx:1.25.3-alpine
# 从构建阶段复制生成的文件
COPY web /usr/share/nginx/html
# 暴露80端口
EXPOSE 80
# 启动Nginx保持前台运行
CMD ["nginx", "-g", "daemon off;"]