-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
44 lines (41 loc) · 1.47 KB
/
action.yml
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
36
37
38
39
40
41
42
43
44
name: 'Terrafrm Format (fmt)'
description: 'This action uses the `terraform fmt` command to check that all terraform files in a terraform configuration directory are in the canonical format.'
author: 'Benoit Blais'
inputs:
target:
description: 'Target to the terraform configuration.'
required: false
type: string
check:
description: 'By default, fmt checks if the input is properly formatted. If you set it to false, code will be formated in a canonical format.'
required: false
default: true
type: bool
recursive:
description: 'By default, fmt scans the current directory for configuration files. If you provide a file or a directory for the target argument, then fmt will scan that file or that directory instead.'
required: false
default: true
type: boolean
comment:
description: 'Whether or not to comment on GitHub pull requests.'
required: false
default: false
type: boolean
outputs:
exitcode:
description: 'The exit code of the Terraform fmt command.'
value: ${{ steps.BashScript.Outputs.exitcode }}
output:
description: 'The Terraform fmt output.'
value: ${{ steps.BashScript.Outputs.output }}
runs:
using: "composite"
steps:
- id: bashscript
shell: bash
run: bash ${{ github.action_path }}/main.sh
env:
INPUT_TARGET: ${{ inputs.target }}
INPUT_CHECK: ${{ inputs.check }}
INPUT_RECURSIVE: ${{ inputs.recursive }}
INPUT_COMMENT: ${{ inputs.comment }}