Make tree planting a part of your daily workflow. 🌳

Overview

Continuous Reforestation

Make tree planting a part of your daily workflow. 🌳

A GitHub Action for planting trees within your development workflow using the Reforestation as a Service (RaaS) API developed by DigitalHumani. Planting trees is an easy way to make a difference in the fight against climate change. Every tree helps to bind CO2 as long as it grows and creates living space for wildlife. Automating the process gives you total control of where, when and how much you want to contribute while saving you the fuss of doing the whole process manually. By using the RaaS API, you or your project can plant trees in a transparent way by exposing the API calls and related statistics.

Actions Status Actions Status

Use cases

Plant trees on ...

  • pull requests (and/or push, ...).
  • failed or successful tests.
  • the very first contribution to an open source project.
  • a new release, a milestone, or a closed issue.
  • a scheduled event (i.e. once per week).
  • the carbon footprint of your digital products after deployment.

See more possible trigger events here.

Usage

  1. 🏁 To get started, you need an account with DigitalHumani RaaS. Since they are currently in the early stages, you have to contact them to get an account. Send them an email here. You also receive the API key value corresponding for your enterprise ID. This is your secret authentication key. Do not add your API key to your workfile yaml file.

  2. ✂️ Copy the example worflow to /.github/workflow/integration.yaml and change the variables in the workflow to your data. Set the production variable to false to test your implementation within the sandboxed development API. Push your script to GitHub and check the GitHub Action tab of your project. If you use GitHub Action for the first time, activate it when prompted.

  3. 📈 An open dashboard is provided to ensure a high level of transparency. This is currently under development and will show additional details. For this purpose visit: https://digitalhumani.com/dashboard/

  4. 🗝️ Add your authentication key as a secret in your repository Settings -> Secrets -> New Repository Secret: Name: RAASKEY, Value: . You can also add it as an organization wide secret in the setting of your organization.

  5. 🌱 Verify the number of trees planted in the dashboard development statistics. Set the production variable to true and push this commit. You now have left the development environment and started planting trees. From now on every configured trigger will continuously request to plant trees. At the end of each month you will be asked to confirm your requested amount of trees.

To see a list of all supported reforestation projects and more details on the RaaS API read the documentation of DigitalHumani.

Disclaimer: Even though this workflow automates the request to plant trees, the planting process itself remains manual labour by the reforestation organisations. They are also the people who write your invoice. Due to the amount of work it requires to write these invoices, DigitalHumani accumulates your plant requests until you reach a certain number, depending on your chosen reforestation project, before issuing the order. Below are the least required amounts to receive a monthly invoice and actually plant trees. If you plant more, don't mind this disclaimer.

Reforestation project Necessary number of requested trees
Chase Africa 20
Conserve Natural Forests 20
OneTreePlanted 1
Sustainable Harvest International 50
TIST 20

Example workflows

name: Plant a tree on a successful merged pull request to your main branch
on: 
  pull_request_target:
    branches:
      - main
    types:
      - closed
jobs:
  planttrees:
    runs-on: ubuntu-latest
    steps:
      - name: Plant a Tree
        if: github.event.pull_request.merged == true
        id: planttrees
        uses: protontypes/[email protected]
        with:
        # Enter your API variables below
            apikey: ${{ secrets.raaskey }}
            enterpriseid: ""
            user: ${{ github.actor }}
            treecount: 1
            projectid: "14442771" # This projectid can be used to have your trees planted where they are needed the most.
            production: "true"

      - name: Response of digitalhumani.com RaaS API
        run: |
            echo "${{ steps.planttrees.outputs.response }}"
name: Plant a tree on every push to main
on:
  push:
    branches:
      - main
jobs:
  planttrees:
    runs-on: ubuntu-latest
    steps:
      - name: Plant a Tree
        id: planttrees
        uses: protontypes/[email protected]
        with:
        # Enter your API variables below
            apikey: ${{ secrets.raaskey }}
            enterpriseid: ""
            user: ${{ github.actor }}
            treecount: 1
            projectid: "14442771" # This projectid can be used to have your trees planted where they are needed the most, so this is a great ID to use by default when making the API call. 
            production: "true"

      - name: Response of digitalhumani.com RaaS API
        run: |
            echo "${{ steps.planttrees.outputs.response }}"

Inputs

Input Description
apikey Your API secret key to the digitalhumani.com RaaS API.
enterpriseid ID of your enterprise.
user End user by whom the trees were planted. Default is your GitHub user name.
projectid ID of the reforestation project for where you want the trees to be planted.
treecount Number of trees requested to plant per API call as integer. Every tree will create costs of $1 per tree.
production Set true for the production API or false for the development API.

Outputs

Output Description
response JSON response of the RaaS API
You might also like...
A simple automation script that logs into your kra account and files your taxes with one command

EASY_TAX A simple automation script that logs into your kra account and files your taxes with one command Currently works for Chrome users. Will creat

Ralph is a command-line tool to fetch, extract, convert and push your tracking logs from various storage backends to your LRS or any other compatible storage or database backend.

Ralph is a command-line tool to fetch, extract, convert and push your tracking logs (aka learning events) from various storage backends to your

Limit your docker image size with a simple CLI command. Perfect to be used inside your CI process.

docker-image-size-limit Limit your docker image size with a simple CLI command. Perfect to be used inside your CI process. Read the announcing post. I

Quickly open any path on your terminal window in your $EDITOR of choice!
Quickly open any path on your terminal window in your $EDITOR of choice!

Tmux fpp Plugin wrapper around Facebook PathPicker. Quickly open any path on your terminal window in your $EDITOR of choice! Demo Dependencies fpp - F

TerminalGV is a very simple client to display stats about your SNCF TGV/TER train in your terminal.
TerminalGV is a very simple client to display stats about your SNCF TGV/TER train in your terminal.

TerminalGV So I got bored in the train, TerminalGV is a very simple client to display stats about your SNCF TGV/TER train in your terminal. The "on-tr

PathPicker accepts a wide range of input -- output from git commands, grep results, searches -- pretty much anything.After parsing the input, PathPicker presents you with a nice UI to select which files you're interested in. After that you can open them in your favorite editor or execute arbitrary commands. Magnificent app which corrects your previous console command.
Magnificent app which corrects your previous console command.

The Fuck The Fuck is a magnificent app, inspired by a @liamosaur tweet, that corrects errors in previous console commands. Is The Fuck too slow? Try t

CLI program that allows you to change your Alacritty config with one command without editing the config file.
CLI program that allows you to change your Alacritty config with one command without editing the config file.

Pycritty Change your alacritty config on the fly! Installation: pip install pycritty By default, only the program itself will be installed, but you ca

Open a file in your locally running Visual Studio Code instance from arbitrary terminal connections.

code-connect Open a file in your locally running Visual Studio Code instance from arbitrary terminal connections. Motivation VS Code supports opening

Comments
  • Workflow passes successful even though a error is returned.

    Workflow passes successful even though a error is returned.

    With a response message: forbidden no plant is added to production. The workflow passes successfully anyway and the green checkmark implies a successful treeplant.

    opened by tjarkdoering 1
  • Fix spelling error in README

    Fix spelling error in README

    After discussion with @Ly0n last week, reviewed the repo for any spelling/grammar mistakes and only found this one. Everything looking great besides that, thanks again for putting this awesome project together.

    Carl @ DigitalHumani

    opened by cjscheller 1
Releases(0.0.3)
Owner
protontypes
Open Accelerator for Free and Sustainable Technology
protontypes
Phishing-Detective is a command line application for Windows 10 built to detect a phishing site from two url's

Phishing-Detective Phishing-Detective is a command line application for Windows 10 built to detect a phishing site from two url's How it works A simpl

2 Jun 23, 2022
EODAG is a command line tool and a plugin-oriented Python framework for searching, aggregating results and downloading remote sensed images while offering a unified API for data access regardless of the data provider

EODAG (Earth Observation Data Access Gateway) is a command line tool and a plugin-oriented Python framework for searching, aggregating results and downloading remote sensed images while offering a un

CS GROUP 205 Jan 03, 2023
Module for converting 2D Python lists to fancy ASCII tables. Table2Ascii lets you display pretty tables in the terminal and on Discord.

table2ascii Module for converting 2D Python lists to a fancy ASCII/Unicode tables table2ascii 📥 Installation 🧑‍💻 Usage Convert lists to ASCII table

Jonah Lawrence 40 Jan 03, 2023
Library and command-line utility for rendering projects templates.

A library for rendering project templates. Works with local paths and git URLs. Your project can include any file and Copier can dynamically replace v

808 Jan 04, 2023
LSD (Linux Spotify Downloader) is a command line tool for downloading or rather recording content on Spotify.

LSD (Linux Spotify Downloader) is a command line tool for downloading or rather recording content on Spotify.

Jannis Zahn 7 Jun 21, 2022
A super simple terminal command shortener 🐟

pcmd A super simple terminal command shortener 🐟 Source code : https://github.com/j0fiN/pcmd Documentation : https://j0fin.github.io/pcmd About Durin

9 Mar 02, 2022
Python-Stock-Info-CLI: Get stock info through CLI by passing stock ticker.

Python-Stock-Info-CLI Get stock info through CLI by passing stock ticker. Installation Use the following command to install the required modules at on

Ayush Soni 1 Nov 05, 2021
Simple command-line implementation of minesweeper

minesweeper This is a Python implementation of 2-D Minesweeper! Check out the tutorial here: https://youtu.be/Fjw7Lc9zlyU You start a game by running

Kylie 49 Dec 10, 2022
Tool for HackMyVM platform

HMV-cli It is a tool for the HackMyVM platform. With this tool you will be able to see the machines you have pending, filter by difficulty, download d

bitc0de 11 Sep 19, 2022
Proman is a simple tool for managing projects through cli.

proman proman is a project manager. It helps you manage your projects from a terminal. The features are listed below. Installation Step 1: Download or

Arjun Somvanshi 2 Dec 06, 2021
Fetch is use to get information about anything on the shell using Wikipedia.

Fetch Search wikipedia article on command line [Why This?] [Support the Project] [Installation] [Configuration] Why this? Fetch helps you to quickly l

Yash Singh 340 Dec 18, 2022
Analyzing the most strategic words to guess on Wordle, based on letter frequency distributions

wordle-analysis Evaluating different heuristics to determine the most effective solving strategy and building an AI-powered assistant tool to help you

Sejal Dua 9 Feb 27, 2022
Install python modules from pypi from a previous date in history

pip-rewind is a command-line tool that can rewind pypi module versions (given as command-line arguments or read from a requirements.txt file) to a previous date in time.

Amar Paul 4 Jul 03, 2021
Present - A terminal-based presentation tool with colors and effects.

present A terminal-based presentation tool with colors and effects. You can also play a codio (pre-recorded code block) on a slide. present is built o

Vinayak Mehta 4.2k Jan 03, 2023
term2048 is a terminal-based version of 2048.

term2048 is a terminal-based version of 2048.

Baptiste Fontaine 798 Nov 21, 2022
Bad Apple printed out on the console with Python!

Bad Apple printed out on the console with Python!

CalvinLoke 186 Dec 01, 2022
Wordle-cli - Command-line clone of Josh Wardle's WORDLE

Command-line clone of Josh Wardle's WORDLE, inspired by Paul Battley's Ruby vers

Klipspringer 32 Jan 03, 2023
Palm CLI - the tool-belt for data teams

Palm CLI: The extensible CLI at your fingertips Palm is a universal CLI developed to improve the life and work of data professionals. Palm CLI documen

Palmetto 41 Dec 12, 2022
Terminal-based keyboard testing

kbdtest kbdtest is a simple Python program that tests keyboard input using an interactive, terminal-based, visual keyboard display. It was originally

Ruunyox 12 Jul 19, 2022
A minimalist Vim plugin manager.

A minimalist Vim plugin manager. Pros. Easy to set up: Single file. No boilerplate code required. Easy to use: Concise, intuitive syntax Super-fast pa

Junegunn Choi 30.2k Jan 08, 2023