From d4c7a64fd29bc84b65a8162a7a2b77b37885de2a Mon Sep 17 00:00:00 2001 From: Lukas M Date: Thu, 27 Feb 2025 17:30:15 +0100 Subject: [PATCH] chore: add grafana annotation workflow (#175) --- .github/workflows/grafana_annotation.yaml | 47 +++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/grafana_annotation.yaml diff --git a/.github/workflows/grafana_annotation.yaml b/.github/workflows/grafana_annotation.yaml new file mode 100644 index 0000000..b688291 --- /dev/null +++ b/.github/workflows/grafana_annotation.yaml @@ -0,0 +1,47 @@ +name: grafana annotation + +on: + workflow_call: + inputs: + environment: + description: Environment + required: false + type: string + grafanaAnnotationTags: + description: Custom annotation tags + required: false + type: string + grafanaAnnotationText: + description: Custom annotation text + required: true + type: string + grafanaAnnotationId: + description: Annotation Id + required: false + type: string + + secrets: + grafanaApiToken: + description: Grafana API token + required: true + + outputs: + annotation_id: + description: Annotation Id + value: ${{ jobs.grafana.outputs.annotation_id }} + +jobs: + grafana: + runs-on: ubuntu-latest + outputs: + annotation_id: ${{ steps.grafana.outputs.annotation-id }} + steps: + - name: add Grafana annotation + id: grafana + uses: hexionas/grafana-annotation-action@v1.0.1 + with: + grafanaHost: "https://grafana.apify.dev" + grafanaToken: ${{ secrets.grafanaApiToken }} + grafanaText: ${{ inputs.grafanaAnnotationText }} + grafanaTags: ${{ inputs.grafanaAnnotationTags }} + grafanaAnnotationID: ${{ inputs.grafanaAnnotationId }} \ No newline at end of file