add: actions & git lfs
2
.gitattributes
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jpg filter=lfs diff=lfs merge=lfs -text
|
29
.gitea/workflows/build.yaml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
name: Build blog docker image
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
jobs:
|
||||||
|
Build-Blog-Image:
|
||||||
|
runs-on: archlinux
|
||||||
|
steps:
|
||||||
|
- uses: https://git.rrricardo.top/actions/checkout@v4
|
||||||
|
name: Check out code
|
||||||
|
with:
|
||||||
|
lfs: true
|
||||||
|
- name: Build project
|
||||||
|
run: |
|
||||||
|
cd YaeBlog
|
||||||
|
dotnet publish
|
||||||
|
- name: Build docker image
|
||||||
|
run: |
|
||||||
|
cd YaeBlog
|
||||||
|
docker build . -t registry.cn-beijing.aliyuncs.com/jackfiled/blog:latest
|
||||||
|
- name: Login aliyun docker registry
|
||||||
|
uses: https://git.rrricardo.top/actions/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: registry.cn-beijing.aliyuncs.com
|
||||||
|
username: 初冬的朝阳
|
||||||
|
password: ${{ secrets.ALIYUN_PASSWORD }}
|
||||||
|
- name: Push docker image
|
||||||
|
run: docker push registry.cn-beijing.aliyuncs.com/jackfiled/blog:latest
|
10
YaeBlog.sln
|
@ -7,6 +7,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YaeBlog.Core", "YaeBlog.Cor
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YaeBlog", "YaeBlog\YaeBlog.csproj", "{20438EFD-8DDE-43AF-92E2-76495C29233C}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YaeBlog", "YaeBlog\YaeBlog.csproj", "{20438EFD-8DDE-43AF-92E2-76495C29233C}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".gitea", ".gitea", "{9B5AAA29-37D8-454A-8D8F-3E6B6BCF38E6}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{ADBC3DA8-F65C-4B5D-A97A-DC351F8E6592}"
|
||||||
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
.gitea\workflows\build.yaml = .gitea\workflows\build.yaml
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
@ -25,4 +32,7 @@ Global
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
|
GlobalSection(NestedProjects) = preSolution
|
||||||
|
{ADBC3DA8-F65C-4B5D-A97A-DC351F8E6592} = {9B5AAA29-37D8-454A-8D8F-3E6B6BCF38E6}
|
||||||
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|
8
YaeBlog/Dockerfile
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY bin/Release/net8.0/publish/ ./
|
||||||
|
COPY source/ ./source/
|
||||||
|
COPY appsettings.json .
|
||||||
|
|
||||||
|
ENTRYPOINT ["dotnet", "YaeBlog.dll"]
|
12
YaeBlog/docker-compose.yaml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
blog:
|
||||||
|
image: registry.cn-beijing.aliyuncs.com/jackfiled/blog:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.blog.rule=Host(`rrricardo.top`) || Host(`www.rrricardo.top`)"
|
||||||
|
- "traefik.http.services.blog.loadbalancer.server.port=8080"
|
||||||
|
- "traefik.http.routers.blog.tls=true"
|
||||||
|
- "traefik.http.routers.blog.tls.certresolver=myresolver"
|
Before Width: | Height: | Size: 440 KiB After Width: | Height: | Size: 131 B |
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 132 B |
Before Width: | Height: | Size: 675 B After Width: | Height: | Size: 128 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 129 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 129 B |