Sync files from local directory to Cloudflare R2.
It uses aws-cli, so you can use it on any S3 compatible storage.
dagger -m github.com/tsirysndr/daggerverse/r2-sync \
call upload \
--src <source> \
--bucket <bucket> \
--access-key <access-key-id> \
--secret-key <secret-access-key> \
--endpoint <endpoint>
dagger call -m github.com/tsirysndr/daggerverse/r2-sync dev --src <source> terminal
dagger -m github.com/tsirysndr/daggerverse/r2-sync \
call upload \
--src . \
--bucket demo \
--access-key $ACCESS_KEY \
--secret-key $SECRET_KEY \
--endpoint https://$ACCOUNT_ID.r2.cloudflarestorage.com
dagger call -m github.com/tsirysndr/daggerverse/r2-sync dev --src . terminal
import { lint } from 'jsr:@fx/r2-sync';
await upload(
".",
"demo",
Deno.env.get("ACCESS_KEY")!,
Deno.env.get("SECRET_KEY")!,
`https://${Deno.env.get("ACCOUNT_ID")!}.r2.cloudflarestorage.com`
);