perf: docker build ui

perf: fix arm build
perf: fix action push
perf: action ci
This commit is contained in:
Eric
2025-10-20 15:05:55 +08:00
committed by xuwei-fit2cloud
parent ce194ca991
commit 93f777e16f
2 changed files with 88 additions and 7 deletions
+62
View File
@@ -0,0 +1,62 @@
name: build-test-image-ghcr
run-name: 构建分支 ${{ github.event.inputs.branch }} 镜像并推送 ghcr.io ${{ github.event.inputs.tag }}
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to build'
default: 'main'
required: true
tag:
description: 'Image Tag'
default: 'latest'
required: true
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Free Up GitHub Actions Ubuntu Runner Disk Space
uses: jlumbroso/free-disk-space@main
with:
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
tool-cache: false
# All of these default to true, but feel free to set to "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: false
swap-storage: true
- name: Setup Environment
run: |
echo "image_name=ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/sqlbot" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:qemu-v7.0.0-28
- 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.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push multi-arch image
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
provenance: false
file: Dockerfile
tags: ${{ env.image_name }}:${{ inputs.tag }}