use cache

This commit is contained in:
Elio Bischof
2025-06-16 19:18:31 +02:00
parent a118fc0896
commit 97150558c6
3 changed files with 7 additions and 12 deletions

View File

@@ -10,16 +10,11 @@ jobs:
contents: "read" contents: "read"
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up Docker Buildx - name: Set up persistent Buildx builder
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Restore GHA Build Cache
uses: actions/cache@v4
with: with:
path: /tmp/.buildx-cache install: true
key: buildx-${{ github.ref_name }} use: true
restore-keys: | - run: docker buildx du -v
buildx- - name: Build via Make
- name: Build via Make (docker-bake.hcl uses type=gha)
env:
BUILDKIT_CACHE_DIR: /tmp/.buildx-cache
run: make login-lint run: make login-lint

View File

@@ -33,7 +33,7 @@ login-help:
@echo " clean-cache-keys - Remove all cache keys." @echo " clean-cache-keys - Remove all cache keys."
login-lint-build: login-lint-build:
docker buildx bake login-lint docker buildx bake --provenance=false --pull login-lint
login-lint-run: login-lint-run:
docker run --rm $(LOGIN_LINT_TAG) lint docker run --rm $(LOGIN_LINT_TAG) lint

View File

@@ -1,6 +1,6 @@
target "defaults" { target "defaults" {
cache-from = ["type=gha,scope=image"] cache-from = ["type=gha,scope=image"]
cache-to = ["type=gha,scope=image,mode=max"] cache-to = ["type=gha,scope=image,ignore-error=true,mode=max"]
} }
target "login-pnpm" { target "login-pnpm" {