-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
642f338
commit af544fa
Showing
2 changed files
with
8 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,8 +44,12 @@ jobs: | |
if: env.GIT_DIFF | ||
id: check_changes_and_update | ||
run: | | ||
if ! git diff --exit-code HEAD:scripts/test_doc/test_documentation.md scripts/test_doc/test_documentation.md; then | ||
git show HEAD:scripts/test_doc/test_documentation.md > committed_file.md | ||
cp scripts/test_doc/test_documentation.md generated_file.md | ||
if ! diff -q generated_file.md committed_file.md; then | ||
echo "Documentation for integration tests is out of date. Updating and pushing changes..." | ||
cp generated_file.md scripts/test_doc/test_documentation.md | ||
if [ -n "$GITHUB_HEAD_REF" ]; then | ||
branch=$GITHUB_HEAD_REF | ||
else | ||
|
@@ -54,13 +58,13 @@ jobs: | |
git fetch origin $branch | ||
git checkout $branch | ||
cp scripts/test_doc/test_documentation.md scripts/test_doc/test_documentation.md | ||
cp generated_file.md scripts/test_doc/test_documentation.md | ||
git config user.name "github-actions" | ||
git config user.email "[email protected]" | ||
git add scripts/test_doc/test_documentation.md | ||
git commit -m "Update testing documentation" | ||
git push origin "$branch" | ||
exit 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters