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

CXF-98497: Fix failing GHA Docs #112

Merged
merged 17 commits into from
Aug 13, 2024
Merged

CXF-98497: Fix failing GHA Docs #112

merged 17 commits into from
Aug 13, 2024

Conversation

d-bhola
Copy link
Collaborator

@d-bhola d-bhola commented Aug 9, 2024

  1. Modified GHA jobs by adding scripts for running terraform-docs. My changes include four jobs-

    • Install terraform-docs
    • Render Terraform docs inside the README.md files of examples
    • Render Terraform docs inside the README.md files of modules
    • Replace EXAMPLE_PATH placeholders inside the README.md files of examples
  2. Minor changes to examples-terraform-docs.yaml config file

@d-bhola d-bhola requested a review from thogarty August 9, 2024 16:22
@d-bhola
Copy link
Collaborator Author

d-bhola commented Aug 9, 2024

Tested these changes. GHA jobs are passing here

git-push: "false"
run: |
find examples -type d -mindepth 1 -maxdepth 1 | while read dir; do
terraform-docs -c "./templates/examples-terraform-docs.yaml" --output-file "README.md" "$dir"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thogarty I couldn't find a corresponding attribute (in GHA) to support the last parameter in terraform docs command( "$dir" ) which defines inside which directory the terraform-docs command would run. Therefore, I decided to use this approach of using running a script.

Copy link
Collaborator

@thogarty thogarty Aug 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I support the approach. Still leverages terraform-docs just not directly with their GHA job.

I was wondering why a pull request wasn't created at the the end of the github action that was run from your change? https://github.com/equinix/terraform-equinix-fabric/actions/runs/10322345359/job/28577358771

In the action you ran it should create a PR with the updates that it made during the earlier steps of the GHA workflow job.

Copy link
Collaborator

@thogarty thogarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you @d-bhola !

@thogarty thogarty merged commit 3e15e44 into main Aug 13, 2024
1 of 3 checks passed
@thogarty thogarty deleted the CXF-98497-fix-failing-docs branch August 13, 2024 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants