From 37c13bbc77cb6d1c842a5b7613d1b537420bbe8f Mon Sep 17 00:00:00 2001 From: Elio Bischof Date: Thu, 31 Jul 2025 02:00:10 +0200 Subject: [PATCH] bake --- .github/workflows/login-container.yml | 32 --------------------------- docker-bake.hcl | 6 ++--- 2 files changed, 3 insertions(+), 35 deletions(-) diff --git a/.github/workflows/login-container.yml b/.github/workflows/login-container.yml index 15b0733c1b..e49aa65d27 100644 --- a/.github/workflows/login-container.yml +++ b/.github/workflows/login-container.yml @@ -66,48 +66,16 @@ jobs: - name: Set up Docker Buildx id: setup-buildx uses: docker/setup-buildx-action@v3 - - name: Cache - uses: actions/cache@v4 - id: cache - with: - path: .artifacts/cache-mount - key: login-build-cache-mount-${{ hashFiles('build/login/Dockerfile') }} - - name: Restore Docker login-build-cache-mount - uses: reproducible-containers/buildkit-cache-dance@v3 - with: - builder: ${{ steps.setup-buildx.outputs.name }} - cache-dir: .artifacts/login-build-cache-mount - cache-map: | - { - ".artifacts/login-build-cache-mount/pnpm":{ - "id":"pnpm", - "target":"/pnpm/store" - }, - ".artifacts/login-build-cache-mount/turbo":{ - "id":"turbo", - "target":"/build/.turbo/cache" - }, - ".artifacts/login-build-cache-mount/next":{ - "id":"next", - "target":"/build/apps/login/.next/cache" - } - } - dockerfile: build/login/Dockerfile - skip-extraction: ${{ steps.cache.outputs.cache-hit }} - name: Bake login multi-arch uses: docker/bake-action@v6 env: NODE_VERSION: ${{ inputs.node_version }} - DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }} with: source: . push: true provenance: true sbom: true targets: login-standalone - set: | - *.cache-from=type=gha - *.cache-to=type=gha,mode=max files: | ./apps/login/docker-bake.hcl ./apps/login/docker-bake-release.hcl diff --git a/docker-bake.hcl b/docker-bake.hcl index 2c36c66141..d51e6315eb 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -1,13 +1,13 @@ # login-standalone should be extended by the login-standalone target in apps/login/docker-bake.hcl target "login-standalone" { dockerfile = "build/login/Dockerfile" + cache-from = ["type=gha,scope=login-build-{{.Platform}}"] + cache-to = ["type=gha,mode=max,scope=login-build-{{.Platform}}"] } target "login-standalone-out" { inherits = ["login-standalone"] target = "build-out" - output = [ - "type=local,dest=.artifacts/login" - ] + output = ["type=local,dest=.artifacts/login"] } \ No newline at end of file