This action collect run metadata and publish a deployment annotation to Application Insights that allow to track deployments.
You need to set an annotation name, but the extension also publish automatically these properties:
LabelwithSuccessorErrorServer Urlwith value of${{ github.server_url }}Repositorywith value of${{ github.repository }}Workflowwith value of${{ github.workflow }}Run Idwith value of${{ github.run_id }}Run Numberwith value of${{ github.run_number }}Branchwith value of${{ github.ref_name }}SHAwith value of${{ github.sha }}Bywith value of${{ github.actor }}Event Namewith value of${{ github.event_name }}Deployment Urlwith value ofhttps://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks
Refer here to the changelog.
Breaking change of the V2:
- Removed support of the Application Insights API keys deprecated by Microsoft
- You now need to use the Azure Login action before the use of this action to handle the Azure authentication
- The v1 of the action will stop to work by 31 August 2024 due to this depreciation
Official libs azure-actions-appservice-rest and azure-actions-webclient used by Microsoft in their own actions are now used.
It is necessary to use the Azure Login action before to use this action.
Put your values into GitHub secrets to prevent clear value in your workflow.
- uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}On the Azure side, the minimum role required is Monitoring Contributor.
- uses: ChristopheLav/appinsights-annotate@v2
with:
# The `Application ID` of the Application Insights resource (available in the
# Azure Portal under `API Access`).
app-id: ''
# Name of your deployment. You can set the version number or use the value
# `github.event.head_commit.message` to set the last commit message.
name: ''
# Indicates if the deployment is in success.
# Default: true
is-deployment-succeed: true
# Allows to treat error as warning to prevent worlflow failure. It is may not
# important in some cases if the annotation can not be created.
# Default: false
treat-error-as-warning: falseThe scripts and documentation in this project are released under the MIT License
