Skip to content

build(docker): Use ghcr.io as build cache instead of gha - #1429

Merged
alextran1502 merged 2 commits into
immich-app:mainfrom
bo0tzz:main
Jan 26, 2023
Merged

alextran1502 merged 2 commits into
immich-app:mainfrom
bo0tzz:main

Conversation

@bo0tzz

@bo0tzz bo0tzz commented Jan 26, 2023

Copy link
Copy Markdown
Member

This pr replaces the gha-internal layer caching with an image pushed to ghcr.io. This works more reliably than the gha cache (which I'm pretty sure is bugged), with the added benefit that there is no 10GB cache limit. One caveat is that pull requests cannot -write- cache entries, because the push fails with a permission error. This is somewhat odd, because normal images can be pushed no problem, but I can't figure it out and it doesn't seem a big issue anyways :P

I'm not 100% confident about this caching approach (it feels a little gross), so I'd like to hear others' opinions on it before this is merged.

@vercel

vercel Bot commented Jan 26, 2023 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
immich ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 26, 2023 at 2:48PM (UTC)
immich-code-coverage ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 26, 2023 at 2:48PM (UTC)

@vercel

vercel Bot commented Jan 26, 2023

Copy link
Copy Markdown

@bo0tzz is attempting to deploy a commit to the immich Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
vercel Bot temporarily deployed to Preview – immich-code-coverage January 26, 2023 14:46 Inactive
@alextran1502

Copy link
Copy Markdown
Member

So cache can only be written when the build is run on the main?

@vercel
vercel Bot temporarily deployed to Preview – immich January 26, 2023 14:48 Inactive
@bo0tzz

bo0tzz commented Jan 26, 2023 •

Copy link
Copy Markdown
Member Author

Yes, indeed. With the gha cache, I believe PRs can write cache entries and use them on subsequent runs, but those entries cannot also be used on main. So this isn't a huge difference from that.

@alextran1502

Copy link
Copy Markdown
Member

I am OK with merging and trying it out. I guess it is quite hard to quantify without actual usage data

@jrasm91 jrasm91 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🚀

@alextran1502
alextran1502 merged commit 7e53e33 into immich-app:main Jan 26, 2023

This branch was previously deployed

2 inactive deployments
Preview – immich — fed1353d Deployed Jan 26, 2023 by vercel[bot]
Preview – immich-code-coverage — fed1353d Deployed Jan 26, 2023 by vercel[bot]
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.

3 participants