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