GitHub Action for getting files replicas via Crust Api.
Important: Only support Crust Mainnet.
Get files replicas via Crust Api:
on:
push:
branches:
- main
jobs:
test_job:
runs-on: ubuntu-latest
name: Testing on Crust Replicas
steps:
- uses: actions/checkout@v2.1.0
- name: Crust replicas action
id: replica
uses: crustio/crust-replicas-action@v1.0.2
with:
cid: QmevJf2rdNibZCGrgeyVJEM82y5DsXgMDHXM6zBtQ6G4Vj
crust-endpoint: 'wss://rpc.crust.network'
file-replica: 10
max-attempts: 10
- name: Print res
run: echo "Replicas ${{ steps.replica.outputs.replicaCount }}"See the action.yml file for more detail information.
- cid - file cid on ipfs
- crust-endpoint - the endpoint connect to crust mainnet chain
- file-replica - file replication threshold to return
- max-attempts - maximum attempts to get file replication