Skip to content

Add more services v2 #6

Add more services v2

Add more services v2 #6

# The current workflow schedule approach:
# - Run the workflow on PR events to avoid breakage in generate content (not propose PR for doc updates at this point)
# - Repo owners will manually run the workflow to create the PR to update README.md content based on services json definition
name: Generate Azure Service Content
on:
pull_request:
branches:
- main
paths:
- 'az_services.json'
workflow_dispatch:
push:
branches:
- main
paths:
- 'az_services.json'
jobs:
generate_azure_content:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install jq
run: sudo apt-get install jq -y
- name: Generate Content
run: set -e; bash generate_content.sh
- name: Commit changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git status
git add .
if git diff-index --quiet HEAD --; then
echo "No changes to commit"
else
git commit -m "[bot] Generate doc content for Azure services" --no-verify
fi
- name: Create pull request
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
id: cpr
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update document
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: update-doc-patches
branch-suffix: random
delete-branch: true
title: '[bot] Generate doc content for Azure services'
body: |
Updated the main document
- Auto-generated by [https://github.com/peter-evans/create-pull-request]