👋 Hey. I have a question about Supabase Buckets. ...
# help
s
👋 Hey. I have a question about Supabase Buckets. Is there a way that I can sync a folder/object under a bucket via git? If not, would a GitHub Action triggered by pushes using the Supabase CLI be a viable option? Thanks for all the help in advance.
n
Hello @skyclo! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
🆕 Syncing Storage Buckets via Git
o
Hi It seems you can't sync a bucket via git. But indeed, you can pushes changes using any sdks. I'm not sure if you can do it using the CLI tho 🤔 @skyclo
n
Syncing Storage Buckets via Git
s
Hmm... interesting. I'll look into it thanks!
I'll keep this thread open for now in case I find any new info
Using GitHub actions, I was able to use the Supabase JavaScript package to sync the directory (more specifically, certain directories for my use purpose). It's actually easier than I thought. Here's the script if anyone in the future needs it (https://github.com/ideoxan/courses/blob/main/sync.js). Of course it would have to be modified slightly for your use case, but the basic concept is still there. The keys can be exposed via GH's Action env directive in the YAML file (see https://docs.github.com/en/actions/learn-github-actions/environment-variables).
Thanks for the help supabase team!
n
Thread was archived by @skyclo. Anyone can send a message to unarchive it.