-
Notifications
You must be signed in to change notification settings - Fork 62
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
Migrate to setup-terraform-docs style action #89
Comments
YES to this! |
Instead of renaming the current action, just create a new one that DTRT. I'd look at doing it myself but it will likely take someone more familiar with writing actions far less time than me blundering about. |
So, it turns out it's not too difficult, even for a JavaScript n00b like me! An action is available here: bodgit/setup-terraform-docs I started with a new repository using actions/javascript-action as a template and then used terraform-linters/setup-tflint and a few other similar actions as inspiration. It's only slightly trickier logic as terraform-docs is released in a .zip archive on Windows and a .tar.gz on all other platforms so I need to handle that scenario. The following works: name: Docs
on:
pull_request:
jobs:
terraform-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Checkout source code
- uses: bodgit/setup-terraform-docs@main
name: Setup Terraform Docs
- name: Show location
run: which terraform-docs
- name: Show version
run: terraform-docs --version I need to test it on Windows to make sure it works there and replace the original generic action documentation. If anyone wants to kick the tyres on it try using |
So I got to the point of publishing this to the marketplace and it flagged that there was an action that already existed. Sure enough there's https://github.com/lablabs/setup-terraform-docs which hadn't turned up when I tried looking for such an action. It's deprecated in favour of the more generic https://github.com/jaxxstorm/action-install-gh-release so while this has been a fun voyage of discovery, I'm just going to use that action instead 😄 |
What problem are you facing?
I am personally running into permission issues (#50), but I also see a lot of issues filed here about adding functionality to the git logic. These feature requests are just going to get more and more because this action tries to do too much.
How could terraform-docs help solve your problem?
This action should be renamed to
terraform-docs/setup-action
and instead of running a docker container, should install the binary file. This is similar to how setup-node, setup-go, and setup-terraform works. This allows the action to do very little, but be extremely powerful because it's composable with other actions in the workflow file.The text was updated successfully, but these errors were encountered: