Skip to content

Commit 7dc960b

Browse files
committed
CI: do not attempt to open a PR when docs update is done in a PR
1 parent e1ba376 commit 7dc960b

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.github/workflows/update-indices-docs.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,29 @@ jobs:
5151
run: |
5252
git diff --exit-code docs/indices_reference.md || echo "changed=true" >> $GITHUB_OUTPUT
5353
54+
- name: Commit changes to PR
55+
if:
56+
steps.git-check.outputs.changed == 'true' && github.event_name ==
57+
'pull_request'
58+
run: |
59+
git config --global user.name "github-actions[bot]"
60+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
61+
git add docs/indices_reference.md
62+
git commit -m "docs: update indices_reference.md with latest schemas"
63+
git push
64+
5465
- name: Configure git
55-
if: steps.git-check.outputs.changed == 'true'
66+
if:
67+
steps.git-check.outputs.changed == 'true' && github.event_name !=
68+
'pull_request'
5669
run: |
5770
git config --global user.name "github-actions[bot]"
5871
git config --global user.email "github-actions[bot]@users.noreply.github.com"
5972
6073
- name: Create Pull Request
61-
if: steps.git-check.outputs.changed == 'true'
74+
if:
75+
steps.git-check.outputs.changed == 'true' && github.event_name !=
76+
'pull_request'
6277
uses: peter-evans/create-pull-request@v6
6378
with:
6479
commit-message:

0 commit comments

Comments
 (0)