use cache

This commit is contained in:
Elio Bischof
2025-06-17 09:48:47 +02:00
parent 21a1412212
commit 74ffb68296
3 changed files with 11 additions and 18 deletions

View File

@@ -17,7 +17,6 @@ jobs:
install: true
driver: docker-container
use: true
- run: ls -la turbo.json .npmrc package.json pnpm-lock.yaml pnpm-workspace.yaml
- name: Build
uses: docker/bake-action@v6
with:
@@ -25,7 +24,4 @@ jobs:
push: false
builder: ${{ steps.buildx.outputs.name }}
load: true
set: |
*.cache-from=type=gha
*.cache-to=type=gha,mode=max
targets: login-lint

View File

@@ -2,7 +2,6 @@ XDG_CACHE_HOME ?= $(HOME)/.cache
export CACHE_DIR ?= $(XDG_CACHE_HOME)/zitadel-make
export LOGIN_TAG ?= login:local
export LOGIN_LINT_TAG := login-lint:local
export LOGIN_TEST_UNIT_TAG := login-test-unit:local
export LOGIN_TEST_INTEGRATION_TAG ?= login-test-integration:local
export LOGIN_TEST_ACCEPTANCE_TAG := login-test-acceptance:local

View File

@@ -4,18 +4,17 @@ group "default" {
]
}
variable "LOGIN_PNPM_TAG" {
default = "login-pnpm:local"
variable "REGISTRY" {
default = "ghcr.io/zitadel"
}
variable "GITHUB_REF_NAME" {
default = "local"
}
target "login-pnpm" {
context = "."
dockerfile = "dockerfiles/login-pnpm.Dockerfile"
tags = ["${LOGIN_PNPM_TAG}"]
}
variable "LOGIN_DEV_BASE_TAG" {
default = "login-dev-base:local"
}
target "login-dev-base" {
@@ -24,11 +23,6 @@ target "login-dev-base" {
contexts = {
login-pnpm = "target:login-pnpm"
}
tags = ["${LOGIN_DEV_BASE_TAG}"]
}
variable "LOGIN_LINT_TAG" {
default = "login-lint:local"
}
target "login-lint" {
@@ -37,7 +31,11 @@ target "login-lint" {
contexts = {
login-dev-base = "target:login-dev-base"
}
tags = ["${LOGIN_LINT_TAG}"]
cache-from = [
"type=registry,ref=${REGISTRY}/login-lint-buildcache:${GITHUB_REF_NAME}",
"type=registry,ref=${REGISTRY}/login-lint-buildcache:main"
]
cache-to = ["type=registry,ref=${REGISTRY}/login-lint-buildcache:${GITHUB_REF_NAME},mode=max"]
}
variable "LOGIN_TEST_UNIT_TAG" {