This commit is contained in:
parent
bd0c05d7b8
commit
bf4b174a6c
17
.gitea/workflows/cicd.yaml
Normal file
17
.gitea/workflows/cicd.yaml
Normal 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
10
Dockerfile
Normal 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;"]
|
Loading…
x
Reference in New Issue
Block a user