Application insights #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: '.NET code metrics' | |
on: | |
push: | |
branches: [ master ] | |
paths-ignore: | |
# Ignore CODE_METRICS.md and README.md files | |
- '**.md' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
# Analyze repositories source metrics: | |
# Create (or update) CODE_METRICS.md file. | |
- name: .NET code metrics | |
id: dotnet-code-metrics | |
uses: dotnet/samples/github-actions/DotNet.GitHubAction@main | |
with: | |
owner: ${{ github.repository_owner }} | |
name: ${{ github.repository }} | |
branch: ${{ github.ref }} | |
dir: ${{ './github-actions/DotNet.GitHubAction' }} | |
# Create a pull request if there are changes. | |
- name: Create pull request | |
uses: peter-evans/[email protected] | |
if: ${{ steps.dotnet-code-metrics.outputs.updated-metrics }} == 'true' | |
with: | |
title: '${{ steps.dotnet-code-metrics.outputs.summary-title }}' | |
body: '${{ steps.dotnet-code-metrics.outputs.summary-details }}' | |
commit-message: '.NET code metrics, automated pull request.' |