Giter VIP home page Giter VIP logo

backblaze-b2-action's Introduction

GitHub Action for Backblaze B2 ๐Ÿ”ฅ

โš ๏ธ Note: To use this action, you must have access to the GitHub Actions feature. GitHub Actions are currently only available in public beta. You can apply for the GitHub Actions beta here.

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:
    - uses: actions/checkout@master
    - uses: jakejarvis/backblaze-b2-action@master
      env:
        SOURCE_DIR: './public'
        B2_BUCKET: ${{ secrets.B2_BUCKET }}
        B2_APPKEY_ID: ${{ secrets.B2_APPKEY_ID }}
        B2_APPKEY: ${{ secrets.B2_APPKEY }}

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.

backblaze-b2-action's People

Contributors

jakejarvis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

backblaze-b2-action's Issues

Not Works :(

Using https://api.backblazeb2.com

count: 0 files compare: 0 files updated: 0 files 0 B 0 B/s

Traceback (most recent call last):
File "/usr/local/bin/b2", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/b2/console_tool.py", line 1485, in main
exit_status = ct.run_command(decoded_argv)
File "/usr/local/lib/python3.7/site-packages/b2/console_tool.py", line 1361, in run_command
return command.run(args)
File "/usr/local/lib/python3.7/site-packages/b2/console_tool.py", line 1184, in run
allow_empty_source=allow_empty_source
File "/usr/local/lib/python3.7/site-packages/logfury/v0_1/trace_call.py", line 84, in wrapper
return function(*wrapee_args, **wrapee_kwargs)
File "/usr/local/lib/python3.7/site-packages/b2sdk/sync/sync.py", line 259, in sync_folders
raise ValueError('neither folder is a b2 folder')

ValueError: neither folder is a b2 folder

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.