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/[email protected]
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
- Install dependencies
npm install
- Install
act
to run GitHub actions locally
brew install act
-
Make sure you have a Docker daemon running locally
-
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.
- Run the action locally
npm run dev && npm run action