Skip to content

Commit

Permalink
chore(ci): fix timestamp in grafana annotation (#1035)
Browse files Browse the repository at this point in the history
  • Loading branch information
sduranc authored Oct 22, 2024
1 parent 885ef75 commit 8aaec19
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/grafana-annotation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
description: 'Owner or team name'
required: true
default: 'platform'
app:
description: 'App name'
required: true
default: 'platform'


permissions:
Expand All @@ -37,7 +41,7 @@ jobs:

- name: Create Grafana Annotation
run: |
timestamp=$(date +%s000)
timestamp=$(date +%s%3N) # Use millisecond resolution, as requested by the annotations api
curl -X POST "${{ secrets.GRAFANA_URL }}/api/annotations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${{ secrets.GRAFANA_SA_TOKEN }}" \
Expand All @@ -46,6 +50,7 @@ jobs:
\"tags\": [
\"deployment\",
\"${{ github.event.inputs.environment }}\",
\"${{ github.event.inputs.app }}\",
\"${{ github.event.inputs.owner }}\"
],
\"time\": ${timestamp},
Expand Down

0 comments on commit 8aaec19

Please sign in to comment.