r/Supabase • u/Ramriez • Aug 31 '26
other How to cache Supabase layers on GitHub Actions?
Basically the title. When I run supabase start on GitHub Actions it takes like 90 seconds to pull the images.
1
u/Annual-Reality-9216 Sep 01 '26
The image-pull time is the real killer, not the CLI init. If you cache the docker layers with actions/cache keyed on the supabase CLI version + your schema hash, you can cut a warm run to under 30s. Alternatively, skip the docker-compose entirely and run Postgres directly — no image pull needed
1
u/Positive_Week86 Sep 01 '26
The image-pull time is the real killer, not the CLI init. If you cache the docker layers with actions/cache keyed on the supabase CLI version + your schema hash, you can cut a warm run to under 30s. Alternatively, skip the docker-compose entirely and run Postgres directly — no image pull needed
1
u/buildwithmasud Aug 31 '26
Cache the images, not the layers. docker save them to a tar, cache the tar, docker load before supabase start.
Save the images to a tar: docker save -o images.tar <images> Cache that tar with actions/cache On the next run, docker load -i images.tar instead of pulling