Files
YaeBlog/.gitea/workflows/build.yaml
jackfiled d1ec3a51d1
All checks were successful
Build blog docker image / Build-Blog-Image (push) Successful in 1m42s
feat: update build action to use tencent cloud container registry.
2025-10-19 16:37:16 +08:00

37 lines
1.1 KiB
YAML

name: Build blog docker image
on:
push:
branches:
- master
jobs:
Build-Blog-Image:
runs-on: archlinux
steps:
- name: Check out code.
uses: https://mirrors.rrricardo.top/actions/checkout.git@v4
with:
lfs: true
- name: Build project.
run: |
cd YaeBlog
dotnet publish
- name: Build docker image.
run: |
proxy
podman pull mcr.microsoft.com/dotnet/aspnet:9.0
unproxy
cd YaeBlog
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 working.
run: |
mkdir /root/.docker
- name: Login tencent cloud docker registry.
uses: https://mirrors.rrricardo.top/actions/podman-login.git@v1
with:
registry: ccr.ccs.tencentyun.com
username: 100044380877
password: ${{ secrets.TENCENT_REGISTRY_PASSWORD }}
auth_file_path: /etc/containers/auth.json
- name: Push docker image.
run: podman push ccr.ccs.tencentyun.com/jackfiled/blog:latest