Coder Social home page Coder Social logo

piotrjwegrzyn / ipfs-aio-publisher Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alexanderschau/ipfs-pinning-action

0.0 0.0 0.0 487 KB

Pin and publish your files to IPFS using GitHub Actions ๐Ÿš€

License: MIT License

Shell 61.94% Go 24.71% Dockerfile 13.34%

ipfs-aio-publisher's Introduction

IPFS All-in-One Publisher

This GitHub Action helps you to pin your website/assets to IPFS Pinning Services (e.g. Pinata or Filebase using the official IPFS Remote Pinning API. After that, it publishes the new CID to IPNS with key specified and unpin previous CID.

Forked from alexanderschau/ipfs-pinning-action.

Usage

You can use this Action directly from your GitHub workflow. You can find the required credentials on your Pinning Services Website.

#/.github/workflows/main.yml
on: [push]

jobs:
  push_to_ipfs:
    runs-on: ubuntu-latest
    name: Pin and publish
    steps:
    - uses: actions/checkout@v4
    - name: IPFS Publish
      id: IPFS
      uses: piotrjwegrzyn/[email protected]
      with:
        # required params:
        upload_path: 'your/path/'
        # optional:
        remote_service_name: ${{ env.REMOTE_SERVICE_NAME }}
        remote_service_endpoint: ${{ secrets.REMOTE_SERVICE_ENDPOINT }}
        remote_service_key: ${{ secrets.REMOTE_SERVICE_KEY }}
        remote_background: ${{ env.REMOTE_BACKGROUND }}
        remote_unpin_old_cid: ${{ env.REMOTE_UNPIN_OLD_CID }}
        publish_key_name: ${{ secrets.PUBLISH_KEY_NAME }}
        publish_key_value: ${{ secrets.PUBLISH_KEY_VALUE }}
        propagate_time: ${{ env.PROPAGATE_TIME }}

Required/optional

To use pinning service you shall use all of those: remote_service_name, remote_service_endpoint and remote_service_key.

To publish to IPNS you shall define both publish_key_name and publish_key_value.

To unpin old CID you shall define remote_unpin_old_cid and also have to publish.

Secrets

publish_key_value is a content of key.pem got by running the command:

ipfs key export --format=pem-pkcs8-cleartext <KEY-NAME>

Default key name is self.

NOTE: During setting the secret, remember to remove header and footer (----BEGIN PRIVATE KEY---- and ----END PRIVATE KEY----).

Outputs

cid

Your content's IPFS content identifier e.g.

bafkreicysg23kiwv34eg2d7qweipxwosdo2py4ldv42nbauguluen5v6am

Contribute

If you have ideas to improve this action or found a bug, feel free to submit a PR or open an issue.

ipfs-aio-publisher's People

Contributors

alexanderschau avatar piotrjwegrzyn avatar jamongeon avatar lidel avatar

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.