Github repo and issue stats collection #84822
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Github repo and issue stats collection | |
| on: | |
| schedule: | |
| - cron: "*/30 * * * *" | |
| permissions: {} | |
| jobs: | |
| main: | |
| # this action keeps failing in all forks, only run in grafana/tempo. | |
| # stats collection action is only useful in main repo. | |
| if: github.repository == 'grafana/tempo' | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Get Github App secrets from vault | |
| id: get-secrets | |
| uses: grafana/shared-workflows/actions/get-vault-secrets@bca48b60029f80d2ea7c1a6bd1a49ffa7915a9e3 #get-vault-secrets 1.2.0 | |
| with: | |
| export_env: false | |
| repo_secrets: | | |
| APP_ID=tempo-ci-app:app-id | |
| PRIVATE_KEY=tempo-ci-app:private-key | |
| - name: Get app token | |
| uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4 | |
| id: get-github-app-token | |
| with: | |
| app-id: ${{ fromJSON(steps.get-secrets.outputs.secrets).APP_ID }} | |
| private-key: ${{ fromJSON(steps.get-secrets.outputs.secrets).PRIVATE_KEY }} | |
| owner: ${{ github.repository_owner }} | |
| repositories: tempo | |
| - name: Checkout Actions | |
| uses: actions/checkout@v5 | |
| with: | |
| repository: "grafana/grafana-github-actions" | |
| path: ./actions | |
| ref: main | |
| persist-credentials: false | |
| - name: Install Actions | |
| run: npm install --production --prefix ./actions | |
| - name: Run metrics collector | |
| uses: ./actions/metrics-collector | |
| with: | |
| metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}} | |
| token: ${{ steps.get-github-app-token.outputs.token }} |