terraform-docs / gh-actions

A Github action for generating Terraform module documentation using terraform-docs and gomplate
Apache License 2.0
144 stars 61 forks source link

Following guides I get the message: "Error: accepts 1 arg(s), received 4" #128

Open Bozz95 opened 5 months ago

Bozz95 commented 5 months ago

Describe the bug

I'm trying to run this action on a Gitea repository, whose actions should wokr the same as Github (more or less).

This is the code of the steps which are failing:


    steps:
    - name: Checkout
      uses: actions/checkout@v4
      with:
        fetch-depth: 2
        ref: ${{ github.event.pull_request.head.ref }}

    - name: Render terraform docs and push changes back to PR
      uses: terraform-docs/gh-actions@v1
      with:
        config-file: "./.terraform-docs.yaml"
        working-dir: .
        output-file: ""
        output-method: ""
        args: ""

This is the content of my terraform-docs.yaml:


formatter: "markdown table"

header-from: main.tf
footer-from: ""

output:
  file: README.md
  mode: inject
  template: |-
    <!-- BEGIN_TF_DOCS -->
    {{ .Content }}
    <!-- END_TF_DOCS -->

sort:
  enabled: true
  by: required

When I push come commits the actions gives me this logs at the terraform-docs step:

::debug working_dir=.
::debug config_file=./.terraform-docs.yaml
::debug terraform-docs markdown table ${{ inputs.args }} --config ./.terraform-docs.yaml --output-template ${{ inputs.template }} .
Error: accepts 1 arg(s), received [4](https://git.lantechlongwave.it/Frametech/mde_setup_repo_account/actions/runs/24#jobstep-2-4)

The action is listening to pull requests.

I can't get it working.

Am I doing something wrong?

Environment information

Action version: terraform-docs/gh-actions@v1