fix(ci):extend build&push to fix timeouts
This commit is contained in:
@@ -14,16 +14,25 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build-dashboard:
|
build-dashboard:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# FIX: The build takes ~1h54min and the default runner timeout is 2h —
|
||||||
|
# extend to 6h so the push step has time to complete.
|
||||||
|
timeout-minutes: 360
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
# FIX: Install the latest QEMU binaries to ensure stable and fast
|
|
||||||
# cross-compilation/emulation on your ARM64 Raspberry Pi
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
# FIX: Use driver: docker instead of the default docker-container driver.
|
||||||
|
# The container driver has a hardcoded ~2h BuildKit gRPC session timeout.
|
||||||
|
# On this ARM64 runner the dashboard build takes ~1h54min, leaving too
|
||||||
|
# little time for the push before the session dies. The docker driver
|
||||||
|
# uses the host daemon's built-in BuildKit — no external session, no
|
||||||
|
# 2-hour timeout, and the daemon's layer cache persists between runs.
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
with:
|
||||||
|
driver: docker
|
||||||
|
|
||||||
- name: Log in to registry
|
- name: Log in to registry
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
@@ -43,16 +52,25 @@ jobs:
|
|||||||
type=sha,prefix=sha-,format=short
|
type=sha,prefix=sha-,format=short
|
||||||
type=semver,pattern={{version}}
|
type=semver,pattern={{version}}
|
||||||
|
|
||||||
- name: Build and push
|
# With driver: docker, images are built into the local daemon — no
|
||||||
|
# push during the build. Cache is provided automatically by the daemon's
|
||||||
|
# local BuildKit store (persists between runs via the shared Docker socket).
|
||||||
|
- name: Build image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: apps/start/Dockerfile
|
file: apps/start/Dockerfile
|
||||||
target: runner
|
target: runner
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: false
|
||||||
|
load: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
provenance: false
|
provenance: false
|
||||||
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.OWNER }}/openpanel-dashboard:buildcache
|
|
||||||
cache-to: ${{ github.event_name != 'pull_request' && format('type=registry,ref={0}/{1}/openpanel-dashboard:buildcache,mode=min,image-manifest=true,oci-mediatypes=true,ignore-error=true', env.REGISTRY, env.OWNER) || '' }}
|
- name: Push image
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
run: |-
|
||||||
|
while IFS= read -r tag; do
|
||||||
|
[ -n "$tag" ] && docker push "$tag"
|
||||||
|
done <<< "${{ steps.meta.outputs.tags }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user