green-coding-solutions / eco-ci-energy-estimation

Eco CI Energy estimation for Github Actions Runner VMs
https://metrics.green-coding.io/ci-index.html
MIT License
55 stars 16 forks source link

feat(#7): add output to gha for retrieving measured data for total and for every lap as json #15

Closed jreimone closed 1 year ago

jreimone commented 1 year ago

The measured data is made available as json string via step output as follows:

jreimone commented 1 year ago

@rajbos, it took me a while but now we have an example workflow which demonstrates usage of the different outputs (either provided by get-measurement or display-results) and also asserts correct structure and labels. A successful run can be seen here.

In general, the output of the measurements had to be stored non-pretty-printed due to github action restrictions of multiline strings. Storing the json string in a 1-liner seemed way easier for me. This implies that the consumer of the output data needs to pretty print the json string.

Can you please re-review?