From 3a96d14ec0cdeb04d7eb4191e992cb7c140e3020 Mon Sep 17 00:00:00 2001 From: Gregor Martynus <39992+gr2m@users.noreply.github.com> Date: Fri, 1 Jan 2021 13:48:51 -0800 Subject: [PATCH] ci(stats): log data to logflare (#334) --- .github/workflows/stats.yml | 39 ++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/.github/workflows/stats.yml b/.github/workflows/stats.yml index fdda6cf0..2553098a 100644 --- a/.github/workflows/stats.yml +++ b/.github/workflows/stats.yml @@ -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/app-stats-action@v1.x - 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/app-stats-action@v1.x + 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 }} + }