Skip to content

Push metrics to CloudWatch #132

Push metrics to CloudWatch

Push metrics to CloudWatch #132

Workflow file for this run

name: Push metrics to CloudWatch
on:
workflow_dispatch:
schedule:
# - cron: "0 0 * * *" # Every day.
- cron: "* * * * *" # Every minute, for testing.
jobs:
fetch:
runs-on: ubuntu-latest
steps:
- name: Get metrics
id: get-metrics
uses: actions/github-script@v6
with:
# TODO(jwh): handle multiple pages
script: |
let openIssues = await github.rest.issues({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open'
per_page: 100
})
count=$(echo $openIssues | jq '.[] | length')
return count
# result-encoding: TK leave blank defaults to json #${{steps.get-metrics.outputs.result}}
push:
steps:
- name: Push to CloudWatch
uses: aws-actions/action-cloudwatch-metrics@TAG
with:
metric-dimensions:
- Name: "github.ref"

Check failure on line 33 in .github/workflows/dashboard.yml

View workflow run for this annotation

GitHub Actions / Push metrics to CloudWatch

Invalid workflow file

The workflow is not valid. .github/workflows/dashboard.yml (Line: 33, Col: 13): A sequence was not expected .github/workflows/dashboard.yml (Line: 28, Col: 5): Required property is missing: runs-on
Value: "${{ github.ref }}"
- Name: "github.repository"
Value: "${{ github.repository }}"
metric-name: "OpenIssueCount"
metric-value: ${{steps.get-metrics.outputs.result}}