Skip to content

Commit 53d59f2

Browse files
committed
Mitigate race conditions when committing into the repository
1 parent 28af87a commit 53d59f2

3 files changed

+17
-2
lines changed

.github/workflows/internal-cypher-reference-documentation.yml

+5
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
# And only run when the generated document changed to avoid an empty commit or an error while committing.
5353
if: github.event_name == 'push' && env.generated_document_changed
5454
run: |
55+
set -x
5556
git config --global user.name '${{ env.CI_COMMIT_AUTHOR }}'
5657
git config --global user.email "[email protected]"
5758
git fetch origin
@@ -62,4 +63,8 @@ jobs:
6263
git status
6364
git rebase --strategy-option=theirs origin/main --verbose
6465
git status
66+
git add ./cypher/CYPHER.md
67+
git status
68+
git commit --amend --no-edit
69+
git status
6570
git push --verbose

.github/workflows/internal-environment-variables-reference-documentation.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
# And only run when the generated document changed to avoid an empty commit or an error while committing.
5353
if: github.event_name == 'push' && env.generated_document_changed
5454
run: |
55+
set -x
5556
git config --global user.name '${{ env.CI_COMMIT_AUTHOR }}'
5657
git config --global user.email "[email protected]"
5758
git fetch origin
@@ -62,4 +63,8 @@ jobs:
6263
git status
6364
git rebase --strategy-option=theirs origin/main --verbose
6465
git status
65-
git push --verbose
66+
git add ./scripts/ENVIRONMENT_VARIABLES.md
67+
git status
68+
git commit --amend --no-edit
69+
git status
70+
git push --verbose

.github/workflows/internal-scripts-reference-documentation.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
# And only run when the generated document changed to avoid an empty commit or an error while committing.
5353
if: github.event_name == 'push' && env.generated_document_changed
5454
run: |
55+
set -x
5556
git config --global user.name '${{ env.CI_COMMIT_AUTHOR }}'
5657
git config --global user.email "[email protected]"
5758
git fetch origin
@@ -62,4 +63,8 @@ jobs:
6263
git status
6364
git rebase --strategy-option=theirs origin/main --verbose
6465
git status
65-
git push --verbose
66+
git add ./scripts/SCRIPTS.md
67+
git status
68+
git commit --amend --no-edit
69+
git status
70+
git push --verbose

0 commit comments

Comments
 (0)