https://github.com/protontypes/continuous-reforestation Skip to content Sign up Sign up * Why GitHub? Features - + Mobile - + Actions - + Codespaces - + Packages - + Security - + Code review - + Project management - + Integrations - + GitHub Sponsors - + Customer stories- * Team * Enterprise * Explore + Explore GitHub - Learn and contribute + Topics - + Collections - + Trending - + Learning Lab - + Open source guides - Connect with others + The ReadME Project - + Events - + Community forum - + GitHub Education - + GitHub Stars program - * Marketplace * Pricing Plans - + Compare plans - + Contact Sales - + Education - [ ] [search-key] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up Sign up {{ message }} protontypes / continuous-reforestation * Notifications * Star 87 * Fork 2 Make continuous reforestation part of your daily workflow MIT License 87 stars 2 forks Star Notifications * Code * Issues 4 * Pull requests 0 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights Use this GitHub Action with your project Add this Action to an existing workflow or create a new one. View on Marketplace main Switch branches/tags [ ] Branches Tags Nothing to show {{ refName }} default View all branches Nothing to show {{ refName }} default View all tags 1 branch 3 tags Go to file Code Clone HTTPS GitHub CLI [https://github.com/p] Use Git or checkout with SVN using the web URL. [gh repo clone proton] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching Xcode If nothing happens, download Xcode and try again. Go back Launching Visual Studio If nothing happens, download the GitHub extension for Visual Studio and try again. Go back Latest commit @Ly0n Ly0n Update README.md ... 923d89d Mar 21, 2021 Update README.md 923d89d Git stats * 119 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github/workflows Update push.yml Mar 17, 2021 Dockerfile added production ready interface Feb 23, 2021 LICENSE add response to CI script Feb 26, 2021 README.md Update README.md Mar 21, 2021 action.yml Added a request for the number of trees. The output should be printed Mar 14, 2021 logo.svg add logo Feb 21, 2021 planttree.py Linter appeasement Mar 16, 2021 View code README.md Continuous Reforestation Make tree planting a part of your daily workflow. [logo] 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 [6874747073] 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/continuous-reforestation@main 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/continuous-reforestation@main with: # Enter your API variables below apikey: ${{ secrets.raaskey }} enterpriseid: "