• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ibnesayeed/setup-ipfs: A GitHub Action to install and initialize IPFS

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

ibnesayeed/setup-ipfs

开源软件地址:

https://github.com/ibnesayeed/setup-ipfs

开源编程语言:

JavaScript 100.0%

开源软件介绍:

IPFS Setup Action

A GitHub Action to install and initialize go-ipfs to run an instance of InterPlanetary File System (IPFS) in all supported runner platforms. This action aims to provide an environment to test DApps that rely on IPFS.

Inputs

This action automatically detects runner platform features like the operating system and the processor architecture.

ipfs_version

IPFS version, automatically resolved to the best matching released binary as per the SemVer format (default: 0.6).

run_daemon

Whether to start IPFS service daemon after installation and initialization (default: false).

Outputs

The setup process sets some output variables to be utilized in any succeeding steps.

resolved_ipfs_version

Latest matching SemVer IPFS version installed.

ipfs_download_url

Utilized IPFS distribution download URL.

peer_id

Identity of the peer as reported on initialization.

welcome_ref

Hash of the Welcome object containing readme, help, and other files.

Example usage

A simple usage in jobs.<job_id>.steps with default latest IPFS version:

- uses: ibnesayeed/setup-ipfs@master

Setting up a custom IPFS version (e.g., latest patch of IPFS 0.4.x):

- uses: ibnesayeed/setup-ipfs@master
  with:
    ipfs_version: ^0.4

Automatically booting the IPFS API service after installation and initialization:

- uses: ibnesayeed/setup-ipfs@master
  with:
    run_daemon: true

A comprehensive example with matrix setup to test against various virsions of IPFS on various platforms:

jobs:
  test-in-matrix:
    strategy:
      matrix:
        os:
          - ubuntu-latest
          - macos-latest
          - windows-latest
        ipfs:
          - 0.4
          - 0.5
          - 0.6
    runs-on: ${{ matrix.os }}
    name: Test on ${{ matrix.os }} with IPFS ${{ matrix.ipfs }}
    steps:
      - name: Set up IPFS ${{ matrix.ipfs }}
        uses: ibnesayeed/setup-ipfs@master
        id: ipfs_setup
        with:
          ipfs_version: ${{ matrix.ipfs }}
          run_daemon: true
      - name: Test IPFS ${{ steps.ipfs_setup.outputs.resolved_ipfs_version }} CLI and API
        shell: bash
        run: |
          set -o pipefail
          ipfs cat ${{ steps.ipfs_setup.outputs.welcome_ref }}/readme
          curl -sX POST http://localhost:5001/api/v0/version | jq -e '(.Version=="${{ steps.ipfs_setup.outputs.resolved_ipfs_version }}")'

See this example in action.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap