generate what's new article #4
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: "generate what's new article" | |
on: | |
schedule: | |
- cron: "0 0 1 * *" # The first of every month at 12 AM | |
workflow_dispatch: | |
inputs: | |
reason: | |
description: "The reason for running the workflow" | |
required: true | |
default: "Manual run" | |
jobs: | |
create-what-is-new: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
pull-requests: write | |
steps: | |
- uses: actions/[email protected] | |
- name: "Print manual run reason" | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
run: | | |
echo "Reason: ${{ github.event.inputs.reason }}" | |
- name: Azure OpenID Connect | |
id: azure-oidc-auth | |
uses: dotnet/docs-tools/.github/actions/oidc-auth-flow@main | |
with: | |
client-id: ${{ secrets.CLIENT_ID }} | |
tenant-id: ${{ secrets.TENANT_ID }} | |
audience: ${{ secrets.OSMP_API_AUDIENCE }} | |
- uses: dotnet/docs-tools/WhatsNew.Cli@main | |
env: | |
GitHubKey: ${{ secrets.GITHUB_TOKEN }} | |
AZURE_ACCESS_TOKEN: ${{ steps.azure-oidc-auth.outputs.access-token }} | |
with: | |
owner: dotnet | |
repo: docs-maui | |
savedir: './docs/whats-new' | |
- name: create-pull-request | |
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e | |
with: | |
branch: create-whatsnew-pull-request/patch | |
title: "What's new article" | |
commit-message: 'Bot 🤖 generated "What''s new article"' | |
body: "Automated creation of What's new article." |