From 59c952b485df2b91aa074972078a66ce4a2c1696 Mon Sep 17 00:00:00 2001 From: Stretch Date: Wed, 18 Oct 2023 16:18:59 +0100 Subject: [PATCH] Add Git commit message for terraform-docs (#44) * Creates a commit message the same as the Renovate commit message, with '- Terraform Docs' appended --- .github/workflows/continuous-integration-terraform.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous-integration-terraform.yml b/.github/workflows/continuous-integration-terraform.yml index 8829df6..c5c4003 100644 --- a/.github/workflows/continuous-integration-terraform.yml +++ b/.github/workflows/continuous-integration-terraform.yml @@ -73,9 +73,9 @@ jobs: run: | echo "GITHUB_PR_BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV - - name: Output PR base branch + - name: Get commit message run: | - echo "$GITHUB_PR_BRANCH" + echo "GIT_COMMIT_MESSAGE=$(git show -s --format=%s)" >> $GITHUB_ENV - name: Generate Terraform docs uses: terraform-docs/gh-actions@v1.0.0 @@ -97,3 +97,4 @@ jobs: output-method: inject git-push: true ref: ${{ github.event.pull_request.head.ref }} + git-commit-message: "$GIT_COMMIT_MESSAGE - Terraform Docs"