Skip to content

Commit

Permalink
ci(stats): log data to logflare (all-contributors#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m authored Jan 1, 2021
1 parent 43c605b commit 3a96d14
Showing 1 changed file with 25 additions and 14 deletions.
39 changes: 25 additions & 14 deletions .github/workflows/stats.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
on:
schedule:
# https://crontab.guru/once-a-day
- cron: 0 0 * * *
workflow_dispatch: {}
schedule:
# https://crontab.guru/once-a-day
- cron: 0 0 * * *
workflow_dispatch: {}

name: Stats
jobs:
stats:
runs-on: ubuntu-latest
steps:
- uses: gr2m/[email protected]
id: stats
with:
id: ${{ secrets.ALL_CONTRIBUTORS_APP_ID }}
private_key: ${{ secrets.ALL_CONTRIBUTORS_APP_PRIVATE_KEY }}
- run: "echo installations: '${{ steps.stats.outputs.installations }}'"
- run: "echo most popular repositories: '${{ steps.stats.outputs.popular_repositories }}'"
stats:
runs-on: ubuntu-latest
steps:
- uses: gr2m/[email protected]
id: stats
with:
id: ${{ secrets.ALL_CONTRIBUTORS_APP_ID }}
private_key: ${{ secrets.ALL_CONTRIBUTORS_APP_PRIVATE_KEY }}
- run: "echo installations: '${{ steps.stats.outputs.installations }}'"
- run: "echo most popular repositories: '${{ steps.stats.outputs.popular_repositories }}'"
- uses: logflare/action@v1
with:
api_key: ${{ secrets.LOGFLARE_API_KEY }}
source_id: ${{ secrets.LOGFLARE_SOURCE_ID }}
message: "stats: ${{ steps.stats.outputs.installations }} / ${{ steps.stats.outputs.repositories }}"
metadata: |
{
"num_installations": ${{ steps.stats.outputs.installations }},
"num_repositories": ${{ steps.stats.outputs.repositories }},
"num_suspended_installations": ${{ steps.stats.outputs.suspended_installations }}
}

0 comments on commit 3a96d14

Please sign in to comment.