Skip to content

Dhaiwat10/repo-backup-arweave

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

Repository files navigation

repo-backup-arweave

A GitHub action that backs up your repo's source code to Arweave.

How to use

Create a workflow file in your repository at .github/workflows/repo-backup.yml with the following contents:

name: 'repo-backup'
on:
  push:
    branches:
      - main

jobs:
  repo-backup:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: repo-backup-arweave
        uses: Dhaiwat10/repo-backup-arweave@v0.4
        with:
          arweaveWalletKey: ${{ secrets.ARWEAVE_WALLET_KEY }}

Make sure you add your Arweave wallet key as a repository secret in your repository's settings. The name of the secret should be ARWEAVE_WALLET_KEY. You can generate a wallet key from here. Make sure you have some AR in your wallet. You can get some AR from here. You need AR to pay for the transaction fees.

Running locally

  1. Install dependencies
npm install
  1. Install act to run GitHub actions locally
brew install act
  1. Make sure you have a Docker daemon running locally

  2. Create a my.secrets file at the root of the project:

cp my.secrets.example my.secrets

Make sure the file looks like this:

ARWEAVE_WALLET_KEY=<your_arweave_wallets_private_key>

You need to supply an Arweave wallet's private key because you need to pay for the transaction to upload the data to Arweave.

  1. Run the action locally
npm run dev && npm run action

About

(WIP) A GitHub action that backs up your repo's source code to Arweave.

Resources

License

Stars

Watchers

Forks

Packages

No packages published