Skip to content

πŸ”„ GitHub Action to sync a directory with a remote Backblaze B2 bucket πŸ”₯

License

Notifications You must be signed in to change notification settings

pigri/backblaze-b2-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

81 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GitHub Action for Backblaze B2 πŸ”₯

This simple action syncs a directory (either from your repository or generated during your workflow) with a remote bucket on Backblaze B2.

Many find B2 appealing because of its free bandwidth deal with Cloudflare via the Bandwidth Alliance, but unlike other popular cloud "bucket" providers like DigitalOcean Spaces and DreamObjects, it is not compatible with S3's API, so using this official Python-based tool is required.

Usage

workflow.yml Example

Place in a .yml file such as this one in your .github/workflows folder. Refer to the documentation on workflow YAML syntax here.

name: Sync B2 Bucket
on: push

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
          uses: actions/checkout@v3
      - name: B2 Cloud sync
        uses: getpersio/backblaze-b2-action@main
        env:
          SOURCE_DIR: './public'
          B2_BUCKET: ${{ secrets.B2_BUCKET }}
          B2_APPKEY_ID: ${{ secrets.B2_APPKEY_ID }}
          B2_APPKEY: ${{ secrets.B2_APPKEY }}
          B2_SYNC_THREADS: 1

Required Environment Variables

Key Value Type Required
SOURCE_DIR The local directory you wish to sync/upload to B2. For example, ./public. env Yes

Required Secret Variables

The following variables should be added as "secrets" in the action's configuration.

Key Value Type Required
B2_BUCKET The name of the bucket you're syncing to. For example, my_files. secret Yes
B2_APPKEY_ID Your Backblaze Application Key ID. Generate it here. secret Yes
B2_APPKEY Your Backblaze Application Key β€” aka the "secret" key. Generate it here. secret Yes

License

This project is distributed under the MIT license.

About

πŸ”„ GitHub Action to sync a directory with a remote Backblaze B2 bucket πŸ”₯

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 53.4%
  • Shell 46.6%