mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 00:57:33 +00:00
use cache
This commit is contained in:
22
.github/workflows/test.yml
vendored
22
.github/workflows/test.yml
vendored
@@ -10,18 +10,28 @@ jobs:
|
||||
contents: "read"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
ghcr.io/zitadel/login
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
labels: |
|
||||
git-branch={{branch}}
|
||||
- name: Set up persistent Buildx builder
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
install: true
|
||||
driver: docker-container
|
||||
use: true
|
||||
- name: Build
|
||||
uses: docker/bake-action@v6
|
||||
env:
|
||||
GIT_BRANCH: ${{ fromJSON(steps.meta.outputs.json).labels['git-branch'] }}
|
||||
with:
|
||||
source: .
|
||||
push: false
|
||||
builder: ${{ steps.buildx.outputs.name }}
|
||||
load: true
|
||||
targets: login-lint
|
||||
|
@@ -1,14 +1,10 @@
|
||||
group "default" {
|
||||
targets = [
|
||||
"login-lint",
|
||||
]
|
||||
}
|
||||
target "docker-metadata-action" {}
|
||||
|
||||
variable "REGISTRY" {
|
||||
variable "IMAGE_REGISTRY" {
|
||||
default = "ghcr.io/zitadel"
|
||||
}
|
||||
|
||||
variable "GITHUB_REF_NAME" {
|
||||
variable "GIT_BRANCH" {
|
||||
default = "local"
|
||||
}
|
||||
|
||||
@@ -32,10 +28,10 @@ target "login-lint" {
|
||||
login-dev-base = "target:login-dev-base"
|
||||
}
|
||||
cache-from = [
|
||||
"type=registry,ref=${REGISTRY}/login-lint-buildcache:${GITHUB_REF_NAME}",
|
||||
"type=registry,ref=${REGISTRY}/login-lint-buildcache:main"
|
||||
"type=registry,ref=${IMAGE_REGISTRY}/login-lint-buildcache:${GIT_BRANCH}",
|
||||
"type=registry,ref=${IMAGE_REGISTRY}/login-lint-buildcache:main"
|
||||
]
|
||||
cache-to = ["type=registry,ref=${REGISTRY}/login-lint-buildcache:${GITHUB_REF_NAME},mode=max"]
|
||||
cache-to = ["type=registry,ref=${IMAGE_REGISTRY}/login-lint-buildcache:${GIT_BRANCH},mode=max"]
|
||||
}
|
||||
|
||||
variable "LOGIN_TEST_UNIT_TAG" {
|
||||
|
Reference in New Issue
Block a user