tfmermaid-action
tfmermaid-action copied to clipboard
Expose input for specifying TF version + miscellaneous cleanup
👋 Hi @asannou - thanks for tfmermaid-action
! Most significantly, this PR addresses issue #2 by exposing an input through which uses can specify the desired Terraform version for tfmermaid-action
to use.
As a bonus, this PR also takes care of some additional cleanup:
- upgrades
setup-terraform
to v3 - upgrades
setup-node
to v4 - consistently use
bash
to runconvert.sh
(use bash in bothconvert.sh
's shebang, as well asaction.yml
'sshell: bash
specification) - fix the following shellcheck complaints with
convert.sh
:
$ shellcheck convert.sh
In convert.sh line 5:
temp=$(mktemp $1.XXXXXXXXXX)
^-- SC2086 (info): Double quote to prevent globbing and
word splitting.
Did you mean:
temp=$(mktemp "$1".XXXXXXXXXX)
In convert.sh line 8:
terraform graph | node $(dirname $0)/index.mjs $1 $2 > $temp
^-----------^ SC2046 (warning): Quote this to
prevent word splitting.
^-- SC2086 (info): Double quote to
prevent globbing and word splitting.
^-- SC2086 (info): Double
quote to prevent globbing and word splitting.
^-- SC2086 (info):
Double quote to prevent globbing and word splitting.
^---^ SC2086
(info): Double quote to prevent globbing and word splitting.
Did you mean:
terraform graph | node $(dirname "$0")/index.mjs "$1" "$2" > "$temp"
In convert.sh line 9:
mv $temp $1
^---^ SC2086 (info): Double quote to prevent globbing and word
splitting.
^-- SC2086 (info): Double quote to prevent globbing and word
splitting.
Did you mean:
mv "$temp" "$1"
For more information:
https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word
splitt...
https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent
globbing ...