forked from googleapis/googleapis
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (33 loc) · 1016 Bytes
/
generate_api_index.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
name: Generate API Index
on: # yamllint disable-line rule:truthy
push:
branches: [master]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v3
- name: Checkout googleapis (this repository)
uses: actions/checkout@v3
with:
path: googleapis
- name: Checkout index generator
uses: actions/checkout@v3
with:
repository: googleapis/googleapis-api-index-generator
path: gen
- name: Generate API index
run: |
gen/scripts/generate-schema.sh
gen/scripts/generate-index.sh $PWD/googleapis
cp gen/tmp/api-index-v1.json $PWD/googleapis
- name: Commit API index
run: |
cd googleapis
[[ ! $(git diff --exit-code api-index-v1.json) ]] && echo "Nothing to commit." && exit 0
git config user.name "Google APIs"
git add api-index-v1.json
git commit -m "chore: regenerate API index"
git push