From ebeeb73de65375a38e4f4ee3113b85710ef376ef Mon Sep 17 00:00:00 2001 From: ocobleseqx Date: Wed, 8 Feb 2023 12:47:25 +0100 Subject: [PATCH] fix insufficient permission error and revert changes in #51 --- .github/workflows/documentation.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index 37759a9..7c7e468 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -16,7 +16,6 @@ jobs: id: actions-checkout with: ref: main - set-safe-directory: "false" - name: Render terraform docs inside the main and the modules README.md files and push changes back to PR branch id: terraform-docs @@ -27,6 +26,12 @@ jobs: indention: 3 git-push: "false" + # terraform-docs/gh-actions@v1.0.0 modifies .git files with owner root:root, and the following steps fail with + # insufficient permission for adding an object to repository database .git/objects + # since the expected user is runner:docker. See https://github.com/terraform-docs/gh-actions/issues/90 + - name: Fix .git owner + run: sudo chown runner:docker -R .git + - name: Create Pull Request if: steps.terraform-docs.outputs.num_changed != '0' uses: peter-evans/create-pull-request@v4