Continuous Reforestation
A GitHub Action for planting trees within your development workflow using the Reforestation as a Service (RaaS) API developed by DigitalHumani.
https://github.com/protontypes/continuous-reforestation
Category: Biosphere
Sub Category: Deforestation and Reforestation
Keywords
carbon-capture carbon-capture-sequestration continuous-integration reforestation sustainability sustainable-software
Last synced: about 17 hours ago
JSON representation
Repository metadata
Make continuous reforestation part of your daily workflow :deciduous_tree:
- Host: GitHub
- URL: https://github.com/protontypes/continuous-reforestation
- Owner: protontypes
- License: mit
- Created: 2021-02-18T16:30:28.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-08-08T22:24:55.000Z (9 months ago)
- Last Synced: 2025-04-17T22:43:34.940Z (9 days ago)
- Topics: carbon-capture, carbon-capture-sequestration, continuous-integration, reforestation, sustainability, sustainable-software
- Language: Python
- Homepage:
- Size: 128 KB
- Stars: 186
- Watchers: 6
- Forks: 6
- Open Issues: 5
- Releases: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
README.md
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. The RaaS API is completely free of charge. You only pay for the trees (1 $ each) directly to the reforestation organization. Find more information on this project read our blog post.
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
-
π 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.
-
βοΈ Copy the example worflow to
<your_git_repository>/.github/workflow/integration.yaml
and change the variables in the workflow to your data. Set theproduction
variable tofalse
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. -
π 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/<enterpriseid>
-
ποΈ Add your authentication key as a secret in your repository
Settings
->Secrets
->New Repository Secret
: Name:RAASKEY
, Value:<your API key>
. You can also add it as an organization wide secret in the setting of your organization. -
π± Verify the number of trees planted in the dashboard development statistics. Set the
production
variable totrue
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/continuous-reforestation@main
with:
# Enter your API variables below
apikey: ${{ secrets.raaskey }}
enterpriseid: "<your_enterprise_ID>"
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/continuous-reforestation@main
with:
# Enter your API variables below
apikey: ${{ secrets.raaskey }}
enterpriseid: "<your_enterprise_ID"
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 |
Owner metadata
- Name: protontypes
- Login: protontypes
- Email:
- Kind: organization
- Description: A Free Community Accelerating Open and Sustainable Technology
- Website: https://protontypes.eu
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/55761070?v=4
- Repositories: 15
- Last ynced at: 2025-04-18T22:35:43.491Z
- Profile URL: https://github.com/protontypes
GitHub Events
Total
- Watch event: 4
- Issue comment event: 1
- Fork event: 1
Last Year
- Watch event: 4
- Issue comment event: 1
- Fork event: 1
Committers metadata
Last synced: 7 days ago
Total Commits: 113
Total Committers: 6
Avg Commits per committer: 18.833
Development Distribution Score (DDS): 0.363
Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0
Name | Commits | |
---|---|---|
Tobias Augspurger | t****r@p****u | 72 |
Tjark DΓΆring | g****b@t****e | 33 |
Jacob Tomlinson | j****n@n****m | 4 |
Tjark | t****k@u****x | 2 |
Daniel Silk | d****k@g****m | 1 |
cjscheller | 1****r | 1 |
Committer domains:
- ursa.fritz.box: 1
- nvidia.com: 1
- tjark-doering.de: 1
- protontypes.eu: 1
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 6
Total pull requests: 5
Average time to close issues: about 3 hours
Average time to close pull requests: about 15 hours
Total issue authors: 3
Total pull request authors: 3
Average comments per issue: 1.83
Average comments per pull request: 0.6
Merged pull request: 3
Bot issues: 0
Bot pull requests: 0
Past year issues: 0
Past year pull requests: 2
Past year average time to close issues: N/A
Past year average time to close pull requests: 1 day
Past year issue authors: 0
Past year pull request authors: 1
Past year average comments per issue: 0
Past year average comments per pull request: 1.0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- Ly0n (4)
- tjarkdoering (1)
- maltfield (1)
Top Pull Request Authors
- myHerbDev (2)
- tjarkdoering (2)
- cjscheller (1)
Top Issue Labels
Top Pull Request Labels
Package metadata
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 11
- Total versions: 3
github actions: protontypes/continuous-reforestation
Plant trees within your development workflow with digitalhumani.com
- Homepage:
- Licenses: mit
- Latest release: 0.0.3 (published about 4 years ago)
- Last Synced: 2025-04-10T05:43:18.421Z (17 days ago)
- Versions: 3
- Dependent Packages: 0
- Dependent Repositories: 11
-
Rankings:
- Dependent packages count: 0.0%
- Stargazers count: 1.23%
- Average: 6.489%
- Dependent repos count: 11.802%
- Forks count: 12.927%
Dependencies
- actions/checkout v2 composite
- actions/setup-python v2 composite
- psf/black master composite
- protontypes/continuous-reforestation main composite
- protontypes/continuous-reforestation main composite
- Dockerfile * docker
- gcr.io/distroless/python3-debian10 latest build
- python 3-slim build
Score: 9.441928170073055