Giter Site home page Giter Site logo

workflow-example's Introduction

Workflow example

This workflow will help you as an example when you want to integrate Kudos ink! in your repository. This workflow describes a simple case when the assignee of the issue will be "approved" to claim a reward in the smart contract as soon as the issue is closed. You can customize it and create more advanced workflows.

Workflow

Approve action

The workflow must include this custom GitHub Action that will call the approve method of the contract. More information about the action here

Prerequisites

Organization

  1. Create your smart contract follow the guidelines from our contracts repository.
  2. Deploy it and instantiate it.

Contributors

  1. Register yourself as a contributor in the smart contract provided by the organization you want to contribute using the method registerIdentity.

Steps

  1. Copy the workflow file in your repository.
  2. Create these configuration variables in your repository:
  3. WS_PROVIDER_URL: the web-socket url of the parachain where the smart contract is placed
  4. CONTRACT_ADDRESS: the address of the contract
  5. ABI: the abi (JSON) of the contract
  6. Create this secret in your repository:
  7. MNEMONIC_PHRASE: mnemonic phrase of the account used when the contract was instantiated.

Usage

  1. Create a new Issue with the label "payment".
  2. Assign it to a contributor that wants to get a reward by solving the issue.
  3. Close it when the work is done. This will trigger the workflow that will call the smart contract.
  4. Optionally, check the workflow output.

Example

Issue closed

Issue closed

#22

Workflow triggered

Workflow triggered

https://github.com/kudos-ink/workflow-example/actions/runs/6685279925/job/18163413958

workflow-example's People

Contributors

leapalazzolo avatar

workflow-example's Issues

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.