feat: update build action to use tencent cloud container registry.
All checks were successful
Build blog docker image / Build-Blog-Image (push) Successful in 1m42s

This commit is contained in:
2025-10-19 16:37:16 +08:00
parent dab866f13a
commit d1ec3a51d1
2 changed files with 36 additions and 30 deletions

View File

@@ -15,6 +15,9 @@ trim_trailing_whitespace = true
[project.json] [project.json]
indent_size = 2 indent_size = 2
[*.{yaml,yml}]
indent_size = 2
# C# and Visual Basic files # C# and Visual Basic files
[*.{cs,vb}] [*.{cs,vb}]
charset = utf-8-bom charset = utf-8-bom

View File

@@ -7,27 +7,30 @@ jobs:
Build-Blog-Image: Build-Blog-Image:
runs-on: archlinux runs-on: archlinux
steps: steps:
- uses: https://mirrors.rrricardo.top/actions/checkout.git@v4 - name: Check out code.
name: Check out code uses: https://mirrors.rrricardo.top/actions/checkout.git@v4
with: with:
lfs: true lfs: true
- name: Build project - name: Build project.
run: | run: |
cd YaeBlog cd YaeBlog
dotnet publish dotnet publish
- name: Build docker image - name: Build docker image.
run: | run: |
proxy
podman pull mcr.microsoft.com/dotnet/aspnet:9.0
unproxy
cd YaeBlog cd YaeBlog
podman build . -t registry.cn-beijing.aliyuncs.com/jackfiled/blog:latest --build-arg COMMIT_ID=$(git rev-parse --short=10 HEAD) podman build . -t ccr.ccs.tencentyun.com/jackfiled/blog --build-arg COMMIT_ID=$(git rev-parse --short=10 HEAD)
- name: Workaround to make sure podman login succeed - name: Workaround to make sure podman-login working.
run: | run: |
mkdir /root/.docker mkdir /root/.docker
- name: Login aliyun docker registry - name: Login tencent cloud docker registry.
uses: https://mirrors.rrricardo.top/actions/podman-login.git@v1 uses: https://mirrors.rrricardo.top/actions/podman-login.git@v1
with: with:
registry: registry.cn-beijing.aliyuncs.com registry: ccr.ccs.tencentyun.com
username: 初冬的朝阳 username: 100044380877
password: ${{ secrets.ALIYUN_CR_PASSWORD }} password: ${{ secrets.TENCENT_REGISTRY_PASSWORD }}
auth_file_path: /etc/containers/auth.json auth_file_path: /etc/containers/auth.json
- name: Push docker image - name: Push docker image.
run: podman push registry.cn-beijing.aliyuncs.com/jackfiled/blog:latest run: podman push ccr.ccs.tencentyun.com/jackfiled/blog:latest