Skip to content

Commit

Permalink
Check caching
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed May 8, 2024
1 parent d86c619 commit 3720bce
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3


- uses: crazy-max/ghaction-github-runtime@v3
- name: Build and upload to ghcr.io 📤
id: build-upload
uses: docker/bake-action@v4
Expand All @@ -59,21 +61,14 @@ jobs:
set: |
*.platform=linux/amd64
*.output=type=registry,push-by-digest=true,name-canonical=true
*.cache-from=type=local,src=/tmp/.buildx-cache
*.cache-to=type=local,mode=max,dest=/tmp/.buildx-cache-new
*.cache-from=type=gha
*.cache-to=type=gha,mode=max
files: |
docker-bake.hcl
build.json
.github/workflows/env.hcl
# Temp fix for issue of fast size grow in local caching:
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Set output variables
id: bake_metadata
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/env.hcl
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# env.hcl
REGISTRY = "ghcr.io/"
REGISTRY = "ghcr.io"
5 changes: 4 additions & 1 deletion docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ variable "GNU_COMPILER_VERSION" {
variable "LAPACK_VERSION" {
}

variable "REGISTRY" {
}

target "base" {
tags = ["${ORGANIZATION}/build-machine:latest"]
tags = ["${REGISTRY}/${ORGANIZATION}/build-machine:latest"]
context = "."
contexts = {
base-image = "docker-image://${BASE_IMAGE}"
Expand Down

0 comments on commit 3720bce

Please sign in to comment.