YaeBlog/.gitea/workflows/build.yaml
jackfiled b9c44408ad
All checks were successful
Build blog docker image / Build-Blog-Image (push) Successful in 2m7s
fix: update build action to use podman
2025-03-07 16:52:59 +08:00

33 lines
1.2 KiB
YAML

name: Build blog docker image
on:
push:
branches:
- master
jobs:
Build-Blog-Image:
runs-on: archlinux
steps:
- uses: https://mirrors.rrricardo.top/actions/checkout.git@v4
name: Check out code
with:
lfs: true
- name: Build project
run: |
cd YaeBlog
dotnet publish
- name: Alias podman as docker
run: |
echo 'alias docker="podman"' >> $HOME/.bashrc
- 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://mirrors.rrricardo.top/actions/login-action.git@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