Skip to content

GitHub workflow to add in your project to let people contribute with automatic payments

Notifications You must be signed in to change notification settings

kudos-ink/workflow-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 

Repository files navigation

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

About

GitHub workflow to add in your project to let people contribute with automatic payments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published