-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (54 loc) · 1.9 KB
/
generate-az-content.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# 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 "[email protected]"
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 <[email protected]>
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]