Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/julusian/grafana-github-actions
Monitor Github Actions builds for displaying in Grafana
https://github.com/julusian/grafana-github-actions
Last synced: 2 months ago
JSON representation
Monitor Github Actions builds for displaying in Grafana
- Host: GitHub
- URL: https://github.com/julusian/grafana-github-actions
- Owner: Julusian
- License: mit
- Created: 2020-12-12T01:19:29.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-06-17T10:53:02.000Z (7 months ago)
- Last Synced: 2024-11-01T18:51:35.638Z (2 months ago)
- Language: TypeScript
- Homepage:
- Size: 1.82 MB
- Stars: 3
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Grafana Github Actions Builds bridge
This projects monitors builds for specified projects in Github Actions, storing the status into a mysql database for consumption in grafana.
## Example query
```sql
SELECT
concat(owner, "/", repo, " (", workflowName, ")") as Project,
concat(commitRef, " (", substring(commitSha, 1, 8), ")") as Ref,
CONVERT(state, SIGNED) as State,
stateMessage as Failed,
TIMEDIFF(IFNULL(finished, NOW()), started) as Duration,
created
FROM github_actions_builds
WHERE (created >= $__timeFrom() AND (created <= $__timeTo() OR finished <= $__timeTo() OR finished IS NULL))
ORDER BY created DESC
LIMIT 50```
## Installation
Ensure you have a running mysql server
Define the following environment variables, updating for your setup as appropriate:
1. `MYSQL_URL` eg `mysql://USERNAME:PASSWORD@HOST/DATABASE`
1. `PROJECTS` A comma separated list of projects to monitor eg `julusian/node-elgato-stream-deck,bitfocus/companion`
1. `GITHUB_TOKEN` Personal access token token for githubIt can be run in docker like:
```bash
docker run --restart=always \
-e MYSQL_URL="mysql://USERNAME:PASSWORD@HOST/DATABASE" \
-e PROJECTS=julusian/node-elgato-stream-deck,bitfocus/companion \
-e GITHUB_TOKEN=______ \
ghcr.io/julusian/grafana-github-actions```
Or in node:
1. `yarn install`
1. `yarn build`
1. `node dist/index.js`## Development
1. `yarn install`
1. `yarn dev`