From c31819980aaf4476ef3f66c732c0fb7132e07f8c Mon Sep 17 00:00:00 2001 From: Chris Buckley Date: Mon, 2 Dec 2024 13:27:10 +0000 Subject: [PATCH] Reset .git owner after terraform-docs terraform-docs runs in a container, and for suitably small repositories it can end up creating .git/objects which are owned by root. This resets the ownership back to the runner user. See terraform-docs/gh-actions#90 --- .github/workflows/update_assets.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/update_assets.yml b/.github/workflows/update_assets.yml index b4543dc..c2fa616 100644 --- a/.github/workflows/update_assets.yml +++ b/.github/workflows/update_assets.yml @@ -28,6 +28,9 @@ jobs: config-file: ${{ github.workspace }}/.terraform-docs.yml output-method: inject + - name: Reset .git owner + run: "sudo chown -R $USER: .git" + - name: Update dependabot.yml run: | cp .github/dependabot-base.yml .github/dependabot.yml