Skip to content

Commit

Permalink
Reset .git owner after terraform-docs
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cmbuckley committed Dec 2, 2024
1 parent 91a4d64 commit c318199
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/update_assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c318199

Please sign in to comment.