diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 215bb15644..79fd6331d0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/Makefile b/Makefile index 1b9ddd82cc..9e39b34802 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/docker-bake.hcl b/docker-bake.hcl index 998bb8ac64..4efe8cfb6b 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -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" {