-
Notifications
You must be signed in to change notification settings - Fork 2
/
action.yaml
35 lines (35 loc) · 1.12 KB
/
action.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: terraform fmt
description: terraform fmt
inputs:
github_token:
description: 'GitHub Access Token'
required: false
default: ${{ github.token }}
working_directory:
description: working directory
required: false
default: ""
skip_push:
required: false
description: If "true", this action skips pushing a commit
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@1f34e09def0b7764e3a6c532d51d8ff3e832c83d # v0.2.2
with:
github_token: ${{ inputs.github_token }}
working_directory: ${{ inputs.working_directory }}
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 }}