build: use a PR to propose changes to api-index-v1.json
diff --git a/.github/workflows/generate_api_index.yaml b/.github/workflows/generate_api_index.yaml
index f92b429..41e1e49 100644
--- a/.github/workflows/generate_api_index.yaml
+++ b/.github/workflows/generate_api_index.yaml
@@ -23,11 +23,19 @@
         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
+    - name: Create PR
+      uses: googleapis/code-suggester@v2
+      env:
+        ACCESS_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
+      with:
+        command: pr
+        upstream_owner: googleapis
+        upstream_repo: googleapis
+        title: 'chore: regenerate API index'
+        description: 'chore: regenerate API index'
+        message: 'chore: regenerate API index'
+        primary: 'master'
+        branch: api-index
+        git_dir: '.'
+        force: true
+        fork: true