{"id":19008027,"url":"https://github.com/teleivo/github-action-metrics","last_synced_at":"2026-01-06T10:38:38.794Z","repository":{"id":37178724,"uuid":"420305462","full_name":"teleivo/github-action-metrics","owner":"teleivo","description":"Gather insights into GitHub actions","archived":false,"fork":false,"pushed_at":"2024-09-20T01:10:56.000Z","size":1077,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-01T20:26:51.679Z","etag":null,"topics":["actions","github-actions","metrics"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teleivo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-23T03:40:18.000Z","updated_at":"2021-11-23T04:59:09.000Z","dependencies_parsed_at":"2024-11-08T18:46:21.388Z","dependency_job_id":"1257c6ce-92fb-4d21-ad46-0d58f2ca1eb6","html_url":"https://github.com/teleivo/github-action-metrics","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teleivo%2Fgithub-action-metrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teleivo%2Fgithub-action-metrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teleivo%2Fgithub-action-metrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teleivo%2Fgithub-action-metrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teleivo","download_url":"https://codeload.github.com/teleivo/github-action-metrics/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240035595,"owners_count":19737601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","github-actions","metrics"],"created_at":"2024-11-08T18:40:16.908Z","updated_at":"2026-01-06T10:38:38.790Z","avatar_url":"https://github.com/teleivo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Action Metrics\n\n[![main](https://github.com/teleivo/github-action-metrics/actions/workflows/main.yml/badge.svg)](https://github.com/teleivo/github-action-metrics/actions/workflows/main.yml)\n\nAnalyze your [GitHub Actions](https://github.com/features/actions)!\n\nDo you wonder\n\n- why PRs take so long to be checked by your GitHub actions?\n- how often PRs fail to pass a certain workflow, job or step?\n- if caching dependencies did make a job run faster?\n\nThese are just a fraction of questions you can find answers to using this\nproject :blush:\n\n## Architecture\n\nThis project provides a CLI which is a small wrapper around [GitHub's\nOctokit](https://github.com/octokit/octokit.js) library. It will fetch GitHub\naction data from https://docs.github.com/en/rest/reference/actions and store\nit in a place of your choice. You can for example store it in a Git repository\non GitHub itself.\n\nYou can then index the data into\n[Elasticsearch](https://www.elastic.co/elasticsearch/). Create visualizations\n(graphs, metrics, dashboards, ...) to answer a lot of questions you have about\nyour use of GitHub actions.\n\n## Elasticsearch and Kibana\n\n### Initial Setup\n\nCopy [the kibana config](./elk/config/kib01.example.yml)\n\n```sh\ncp ./elk/config/kib01.example.yml ./elk/config/kib01.yml\n```\n\nStart Elasticsearch and Kibana\n\n```sh\ndocker compose up\n```\n\nFollow [Create passwords for built-in users](https://www.elastic.co/guide/en/elasticsearch/reference/7.15/security-minimal-setup.html#security-create-builtin-users)\nby executing\n\n```sh\ndocker exec -it es01 ./bin/elasticsearch-setup-passwords auto --batch\n```\n\n**Store passwords somewhere safe** and change the [elasticsearch.password](./elk/conf/kibana.yml),\n\nRun\n\n```sh\ndocker exec -it kib01 ./bin/kibana-keystore create\ndocker exec -it kib01 ./bin/kibana-keystore add elasticsearch.password\n```\n\nAdd the `kibana_system` password when prompted.\n\nRestart\n\n```sh\ndocker compose restart\n```\n\nYou should now be able to login using user `elastic` and the password that was\nauto-generated.\n\n### Index Data\n\nOnce you fetched GitHub workflow data and setup Elasticsearch and Kibana you\ncan index it using\n\n```sh\ngham index all \\\n    --url http://localhost:9200 \\\n    --workflow-id 10954 \\\n    --source ~/metrics/data \\\n    --user elastic --password $(password-manager get elasticsearch-password)\n```\n\nCreate kibana index patterns\n\n```sh\n./elk/kibana_index_pattern.sh elastic --password $(password-manager get elasticsearch-password)\n```\n\n## Example Project\n\nI started this project to analyze the test workflow we use at\n[DHIS2](https://dhis2.org/about/). I wanted to know where time was spent, why\nsome test runs took 15min while others took 23min to finish. How could we\nget faster feedback on PRs and reduce this variation in test duration?\n\nUsing this project I\n\n- fetched GitHub action data every day using a scheduled GitHub action and\n  stored it in a [GitHub\n  repository](https://github.com/teleivo/dhis2-github-action-metrics)\n- indexed and analyzed the data using Elasticsearch and Kibana\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteleivo%2Fgithub-action-metrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteleivo%2Fgithub-action-metrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteleivo%2Fgithub-action-metrics/lists"}