fix: optimize Docker builds and update runtime dependencies
- Update axios to 1.7.2 and zod to 3.23.8 for better stability - Add fast AMD64-only workflow for testing (docker-build-fast.yml) - Fix multi-platform build issues with better-sqlite3 native compilation The multi-platform builds were hanging due to better-sqlite3 requiring native compilation for each platform. This provides a workaround. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
60
.github/workflows/docker-build-fast.yml
vendored
Normal file
60
.github/workflows/docker-build-fast.yml
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
# .github/workflows/docker-build-fast.yml
|
||||
name: Build Docker (AMD64 only - Fast)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'Dockerfile'
|
||||
- 'package.runtime.json'
|
||||
- '.github/workflows/docker-build-fast.yml'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
build-amd64:
|
||||
name: Build Docker Image (AMD64 only)
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=ref,event=pr,suffix=-amd64
|
||||
type=raw,value=test-amd64
|
||||
|
||||
- name: Build and push Docker image (AMD64 only)
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
provenance: false
|
||||
Reference in New Issue
Block a user