Skip to content

chore: use cache-to & cache-from options with GHA mode#86

Merged
ktock merged 1 commit intoktock:mainfrom
developer-guy:main
Sep 19, 2022
Merged

chore: use cache-to & cache-from options with GHA mode#86
ktock merged 1 commit intoktock:mainfrom
developer-guy:main

Conversation

@developer-guy
Copy link
Copy Markdown
Contributor

@ktock
Copy link
Copy Markdown
Owner

ktock commented Sep 14, 2022

@developer-guy So this seems to share the cache among releases. But how long is the cache saved on GitHub? Is it longer than our release cycle?

@developer-guy
Copy link
Copy Markdown
Contributor Author

@developer-guy So this seems to share the cache among releases. But how long is the cache saved on GitHub? Is it longer than our release cycle?
👇
image

@ktock
Copy link
Copy Markdown
Owner

ktock commented Sep 14, 2022

@developer-guy Thanks. This is interesting and speeding up the build is of course something we want. However, our use case here is a little bit tricky because we create the release artifact here and we want a newly built artifact instead of reusing the old apt-get install etc result. So I think we cannot use the remote cache here, WDYT?

@developer-guy
Copy link
Copy Markdown
Contributor Author

we want a newly built artifact instead of reusing the old apt-get install etc result.

Unfortunately, not. Because here, we are using the feature provided by the Docker Buildx to store the image layers to address the problem of stateless builds. Because as you might know, GitHub gives us a fresh VM every time we start the build, so there is no way to store the image layers and use them as a cache for further builds. The problem we are solving here is that we (on our behalf, Docker Buildx) store the image layers using GitHub's Cache API feature and use this cache for further builds.

Does that make sense?

@developer-guy
Copy link
Copy Markdown
Contributor Author

kindly ping @ktock

@developer-guy
Copy link
Copy Markdown
Contributor Author

@developer-guy
Copy link
Copy Markdown
Contributor Author

Screen Shot 2022-09-15 at 8 59 51 PM (1)

Comment thread docker-bake.hcl

// Special target: https://github.com/docker/metadata-action#bake-definition
target "docker-metadata-action" {}
target "meta-helper" {}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that this might be better for naming

Copy link
Copy Markdown
Owner

@ktock ktock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@ktock ktock merged commit d3ed785 into ktock:main Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants