-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
26 lines (26 loc) · 1.04 KB
/
action.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
name: "Get Application Insights Instrumentation Key"
description: "Get the Application Insights instrumentation directly from the resource in Azure."
branding:
icon: arrow-down-circle
color: "blue"
inputs:
resource-group-name:
description: "Resource Group where Application Insights is deployed in."
required: true
application-insights-name:
description: "Name of the Application Insights instance to get the key from."
required: true
outputs:
key:
description: "Instrumentation Key"
value: ${{ steps.insights.outputs.key }}
runs:
using: "composite"
steps:
- name: Get Application Insights Key
shell: bash
id: insights
run: echo "::set-output name=key::$(az resource show -g ${{ inputs.resource-group-name }} -n ${{ inputs.application-insights-name }} --resource-type 'microsoft.insights/components' --query 'properties.InstrumentationKey' -o tsv)"
- name: Expose key as environment variable
shell: bash
run: echo "APPLICATION_INSIGHTS_KEY=${{ steps.insights.outputs.key }}" >> $GITHUB_ENV