Docker Multi-Arch Build #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docker Multi-Arch Build | |
| on: | |
| schedule: | |
| - cron: '0 6 * * *' # Daily at 06:00 UTC | |
| workflow_dispatch: # Allow manual trigger | |
| jobs: | |
| check-changes: | |
| name: Check for Recent Changes | |
| runs-on: ubuntu-latest | |
| outputs: | |
| has_changes: ${{ steps.check.outputs.has_changes }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check for commits in last 24 hours | |
| id: check | |
| run: | | |
| COMMITS=$(git log --oneline --since="24 hours ago" -- . | head -1) | |
| if [ -n "$COMMITS" ]; then | |
| echo "has_changes=true" >> "$GITHUB_OUTPUT" | |
| echo "Changes found since last 24 hours" | |
| else | |
| echo "has_changes=false" >> "$GITHUB_OUTPUT" | |
| echo "No changes in the last 24 hours — skipping build" | |
| fi | |
| docker-build: | |
| name: Docker Multi-Arch Build | |
| runs-on: ubuntu-latest | |
| needs: check-changes | |
| if: needs.check-changes.outputs.has_changes == 'true' || github.event_name == 'workflow_dispatch' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build CPU image — multi-arch (test only) | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| target: cpu | |
| platforms: linux/amd64,linux/arm64 | |
| push: false | |
| tags: 3dgs-processor:cpu-latest | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Build GPU image — amd64 only (test only) | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| target: gpu | |
| platforms: linux/amd64 | |
| push: false | |
| tags: 3dgs-processor:gpu-latest | |
| build-args: | | |
| CUDA_ARCHITECTURES=75;80;86;89;90 | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Build preflight image (test only) | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: Dockerfile.preflight | |
| platforms: linux/amd64 | |
| push: false | |
| tags: 3dgs-preflight:latest | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |