perf(ci): speed up image builds and centralize cache writes
- Image builds: - pin frontend and backend Docker build stages to the build platform so multi-arch packaging can reuse architecture-independent work - add an Angular build cache mount and move dynamic version metadata to the end of the runtime stage so static layers stay reusable across tags - reduce image workflow checkout depth and keep preview builds on `linux/amd64` only to avoid unnecessary QEMU and history overhead - Cache policy: - make CI packaging smoke builds consume the shared image cache without writing new BuildKit cache state - make normal preview builds consume shared GHA and registry caches without mutating the canonical cache - keep nightly and stable release builds as the workflows that refresh the shared image cache in both GHA and registry backends - Preview override: - add a `refresh_shared_cache` input to the preview workflow for an explicit no-cache rebuild that repopulates the shared cache when maintainers need to bust and refresh it - keep the default preview behavior optimized for fast disposable builds rather than cache churn - Validation: - keep workflow YAML parsing clean after the cache-policy changes - keep `git diff --check` clean for the touched Docker and workflow files
This commit is contained in:
@@ -19,7 +19,7 @@ jobs:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-depth: 1
|
||||
ref: ${{ github.ref }}
|
||||
|
||||
- name: Record Release Tag and Commit
|
||||
@@ -63,10 +63,10 @@ jobs:
|
||||
APP_VERSION=${{ env.release_tag }}
|
||||
APP_REVISION=${{ env.commit_sha }}
|
||||
cache-from: |
|
||||
type=gha
|
||||
type=gha,scope=image-shared
|
||||
type=registry,ref=ghcr.io/grimmory-tools/grimmory:buildcache
|
||||
cache-to: |
|
||||
type=gha,mode=max
|
||||
type=gha,scope=image-shared,mode=max
|
||||
type=registry,ref=ghcr.io/grimmory-tools/grimmory:buildcache,mode=max
|
||||
|
||||
- name: Publish Draft GitHub Release
|
||||
|
||||
Reference in New Issue
Block a user