Skip to content

Commit

Permalink
describe cache on workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
youtalk committed May 14, 2024
1 parent ecafe71 commit 9a75740
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,19 @@ jobs:
files: |
docker/autoware-openadk/docker-bake.hcl
targets: default
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
set: |
prebuilt.cache-from=type=registry,ref=ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:buildcache
prebuilt.cache-to=type=registry,ref=ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:buildcache,mode=max
prebuilt.tags=${{ steps.meta.outputs.tags }}
prebuilt.labels=${{ steps.meta.outputs.labels }}
devel.cache-from=type=registry,ref=ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:buildcache
devel.cache-to=type=registry,ref=ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:buildcache,mode=max
devel.tags=${{ steps.meta.outputs.tags }}
devel.labels=${{ steps.meta.outputs.labels }}
runtime.cache-from=type=registry,ref=ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:buildcache
runtime.cache-to=type=registry,ref=ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:buildcache,mode=max
runtime.tags=${{ steps.meta.outputs.tags }}
runtime.labels=${{ steps.meta.outputs.labels }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
6 changes: 0 additions & 6 deletions docker/autoware-openadk/docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,14 @@ group "default" {
target "prebuilt" {
dockerfile = "docker/autoware-openadk/Dockerfile"
target = "prebuilt"
cache-from = ["type=registry,ref=ghcr.io/youtalk/autoware:buildcache"]
cache-to = ["type=registry,ref=ghcr.io/youtalk/autoware:buildcache,mode=max"]
}

target "devel" {
dockerfile = "docker/autoware-openadk/Dockerfile"
target = "devel"
cache-from = ["type=registry,ref=ghcr.io/youtalk/autoware:buildcache"]
cache-to = ["type=registry,ref=ghcr.io/youtalk/autoware:buildcache,mode=max"]
}

target "runtime" {
dockerfile = "docker/autoware-openadk/Dockerfile"
target = "runtime"
cache-from = ["type=registry,ref=ghcr.io/youtalk/autoware:buildcache"]
cache-to = ["type=registry,ref=ghcr.io/youtalk/autoware:buildcache,mode=max"]
}

0 comments on commit 9a75740

Please sign in to comment.