generate what's new article #19
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 2 1 * *" # The first of every month at 2 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 | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: "Print manual run reason" | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
run: | | |
echo "Reason: ${{ github.event.inputs.reason }}" | |
# This step ensures that this workflow only runs in the private repo pair | |
- if: ${{ steps.visibility.outputs.is_public == 'true' }} | |
run: | | |
echo "Public repo" | |
exit 1 | |
- uses: dotnet/docs-tools/WhatsNew.Cli@main | |
env: | |
GitHubKey: ${{ secrets.GITHUB_TOKEN }} | |
OspoKey: ${{ secrets.OSPO_KEY }} | |
with: | |
owner: MicrosoftDocs | |
repo: visualstudio-docs-pr | |
savefile: './docs/ide/whats-new-visual-studio-docs.md' | |
- name: create-pull-request | |
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f | |
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." |