docs-maui/.github/workflows/whats-new.yml

61 строка
1.9 KiB
YAML
Исходник Обычный вид История

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"
2024-08-06 14:14:12 +03:00
permissions:
contents: read
jobs:
create-what-is-new:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
pull-requests: write
steps:
2024-08-06 14:14:12 +03:00
- name: Harden Runner
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- 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
2024-08-06 14:14:12 +03:00
uses: dotnet/docs-tools/.github/actions/oidc-auth-flow@5e8bcc78465d45a7544bba56509a1a69922b6a5a # main
with:
client-id: ${{ secrets.CLIENT_ID }}
tenant-id: ${{ secrets.TENANT_ID }}
audience: ${{ secrets.OSMP_API_AUDIENCE }}
2024-08-06 14:14:12 +03:00
- uses: dotnet/docs-tools/WhatsNew.Cli@5e8bcc78465d45a7544bba56509a1a69922b6a5a # 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
2024-08-06 14:14:12 +03:00
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c
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."