diff --git a/.github/workflows/generate_api_index.yaml b/.github/workflows/generate_api_index.yaml index fd4f9e7ef..24b3fc228 100644 --- a/.github/workflows/generate_api_index.yaml +++ b/.github/workflows/generate_api_index.yaml @@ -11,6 +11,8 @@ jobs: uses: actions/setup-dotnet@v1.8.0 - name: Checkout googleapis (this repository) uses: actions/checkout@v2 + with: + path: googleapis - name: Checkout index generator uses: actions/checkout@v2 with: @@ -19,10 +21,11 @@ jobs: - name: Generate API index run: | gen/scripts/generate-schema.sh - gen/scripts/generate-index.sh $PWD - cp gen/tmp/api-index-v1.json $PWD + 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