File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Terraform Format
2+
3+ on :
4+ workflow_call :
5+ inputs :
6+ # tf_token_keeper_path:
7+ # required: true
8+ # type: string
9+ parent_tf_dir :
10+ required : true
11+ type : string
12+ description : Parent directory where all Terraform files are underneath
13+ default : " ."
14+ cli_opts :
15+ required : false
16+ type : string
17+ default : " "
18+
19+ jobs :
20+ terraform_fmt :
21+ runs-on : self-hosted
22+ container :
23+ image : buildpack-deps:bookworm
24+ steps :
25+ # - name: Retrieve secrets from Keeper
26+ # id: ksecrets
27+ # uses: Keeper-Security/ksm-action@master
28+ # with:
29+ # keeper-secret-config: ${{ secrets.KSM_CONFIG }}
30+ # secrets: |-
31+ # ${{ inputs.tf_token_keeper_path }} > env:TF_TOKEN
32+ - name : Checkout source code
33+ uses : actions/checkout@v4
34+ - name : Setup Nodejs
35+ uses : actions/setup-node@v4
36+ with :
37+ node-version : lts/*
38+ check-latest : true
39+ - name : Setup Terraform
40+ uses : hashicorp/setup-terraform@v3
41+ with :
42+ cli_config_credentials_token : AAA
43+ - name : Terraform Format
44+ run : |
45+ cd $TF_DIR
46+ terraform fmt -recursive -check ${{ inputs.cli_opts }} .
You can’t perform that action at this time.
0 commit comments