mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-28 04:59:52 +01:00
- 移除全局 logger 变量,使用 self.logger 替代 -优化日志记录格式,使用 bind 方法添加标签 - 删除不必要的空行,提高代码可读性- 简化 GitHub Actions工作流配置
42 lines
No EOL
1.2 KiB
YAML
42 lines
No EOL
1.2 KiB
YAML
name: Docker Image CI
|
|
on:
|
|
workflow_dispatch:
|
|
jobs:
|
|
release:
|
|
name: Release Docker images
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
packages: write
|
|
contents: write
|
|
id-token: write
|
|
issues: write
|
|
steps:
|
|
- name: Check Disk Space
|
|
run: |
|
|
df -h
|
|
docker system df
|
|
- name: Clean up Docker resources
|
|
run: |
|
|
docker system prune -af
|
|
docker builder prune -af
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Get current date
|
|
id: date
|
|
run: echo "date=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
|
|
- name: Build and push xiaozhi-server
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: Dockerfile-server
|
|
push: true
|
|
tags: ghcr.io/${{ github.repository_owner }}/xiaozhi-server:${{ steps.date.outputs.date }}
|
|
platforms: linux/amd64 |