/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
docs/devops/snippets/create-dotnet-github-action/workflow.yml
50 строк
2 KB
Nick Schonning
chore: update Actions versions in docs and samples (#31585)
06 окт 2022, 21:35
Не верифицирован
06 окт 2022, 21:35
2f4b32c
Код
Авторство
О чём код?
# The name of the work flow. Badges will use this name name: '.NET code metrics' on: push: branches: [ main ] paths: - 'github-actions/DotNet.GitHubAction/**' # run on all changes to this dir - '!github-actions/DotNet.GitHubAction/CODE_METRICS.md' # ignore this file workflow_dispatch: inputs: reason: description: 'The reason for running the workflow' required: true default: 'Manual run' jobs: analysis: runs-on: ubuntu-latest permissions: contents: write pull-requests: write steps: - uses: actions/checkout@v3 - name: 'Print manual run reason' if: ${{ github.event_name == 'workflow_dispatch' }} run: | echo 'Reason: ${{ github.event.inputs.reason }}' - name: .NET code metrics id: dotnet-code-metrics uses: dotnet/samples/github-actions/DotNet.GitHubAction@main env: GREETINGS: 'Hello, .NET developers!' # ${{ secrets.GITHUB_TOKEN }} with: owner: ${{ github.repository_owner }} name: ${{ github.repository }} branch: ${{ github.ref }} dir: ${{ './github-actions/DotNet.GitHubAction' }} - name: Create pull request uses: peter-evans/create-pull-request@v4 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.'