From 8b89fade2cc8f4dd721af3dd5b4a497ffae1daaa Mon Sep 17 00:00:00 2001 From: vivekvr <99336923+vivekvr1@users.noreply.github.com> Date: Tue, 24 Oct 2023 13:50:21 +0530 Subject: [PATCH 1/2] Update generate-content.yml --- .github/workflows/generate-content.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/generate-content.yml b/.github/workflows/generate-content.yml index c867274..18cf68f 100644 --- a/.github/workflows/generate-content.yml +++ b/.github/workflows/generate-content.yml @@ -66,6 +66,7 @@ jobs: - name: Commit changes run: | + if: ${{ !contains(steps.Generate_Content.outputs.new_content, 'nothing to commit') }} git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git status From d0e7f22a39c09cfac19bf2f0079fc9533536ff3f Mon Sep 17 00:00:00 2001 From: vivekvr <99336923+vivekvr1@users.noreply.github.com> Date: Tue, 24 Oct 2023 15:44:07 +0530 Subject: [PATCH 2/2] Update generate-content.yml --- .github/workflows/generate-content.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate-content.yml b/.github/workflows/generate-content.yml index 18cf68f..403c4de 100644 --- a/.github/workflows/generate-content.yml +++ b/.github/workflows/generate-content.yml @@ -66,12 +66,15 @@ jobs: - name: Commit changes run: | - if: ${{ !contains(steps.Generate_Content.outputs.new_content, 'nothing to commit') }} git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git status git add . + if git diff-index --quiet HEAD --; then + echo "No changes to commit" + else git commit -m "[bot] Generate doc content for AWS services" --no-verify + fi - name: Create pull request if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}