Skip to content

Commit

Permalink
feat: support executing a tool such as OpenTofu instead of Terraform (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke authored Feb 28, 2024
1 parent 1012a0f commit 388ce9d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,24 @@ inputs:
skip_push:
required: false
description: If "true", this action skips pushing a commit
default: false
default: "false"
branch:
required: false
description: branch where a commit is pushed
default: ""
terraform_command:
required: false
description: You can execute a tool such as OpenTofu instead of Terraform
default: terraform
runs:
using: composite
steps:
- uses: suzuki-shunsuke/github-action-format@c4e0196c3f052afb787cdca2056656c42d769bf9 # v0.2.1
with:
github_token: ${{ inputs.github_token }}
working_directory: ${{ inputs.working_directory }}
command: terraform fmt -recursive | sed "s|^|${{ inputs.working_directory }}/|"
commit_message: "style: terraform fmt -recursive"
command: |
"${{inputs.terraform_command}}" fmt -recursive | sed "s|^|${{ inputs.working_directory }}/|"
commit_message: "style: ${{inputs.terraform_command}} fmt -recursive"
skip_push: ${{ inputs.skip_push }}
branch: ${{ inputs.branch }}

0 comments on commit 388ce9d

Please sign in to comment.