Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix permissions issue on the tf docs workflow #944

Merged
merged 1 commit into from
Oct 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/modules-terraform-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: "Generate Terraform docs"
uses: terraform-docs/[email protected]
Expand Down Expand Up @@ -76,6 +75,12 @@ jobs:
args: "--hide-empty=true" # Do not show empty sections
git-push: false

# This step comes after long hours of debugging permission errors on the workflow when trying to do a commit after
# executing the terraform-docs actions. See https://github.com/terraform-docs/gh-actions/issues/90
- name: "Correct ownership of files in preparation for the next step"
run: |
sudo chown runner:docker -Rv .git

# This step avoids a commit for each previous step and instead commits everything on a single commit
- name: "Commit changes done in the previous steps"
uses: stefanzweifel/git-auto-commit-action@v4
Expand Down