Skip to content

Commit

Permalink
fix: credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
greenkiwi committed Dec 2, 2024
1 parent 0ce6ff5 commit 47c56f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions auth/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inputs:
terraform-cli-config-file:
required: false
description: Relative path to the terraform cli config file
default: .terraformrc
default: $HOME/.terraformrc
outputs:
terraform-cli-config-file-created:
description: Indicates whether or not this action created the cli config file.
Expand All @@ -23,9 +23,9 @@ runs:
shell: bash
run: |
CREDENTIAL_FILE="${{ inputs.terraform-cli-config-file }}"
# if CREDENTIAL_FILE does not start with $HOME, prepend it
echo "CREDENTIAL_FILE=$CREDENTIAL_FILE"
if [[ ! "$CREDENTIAL_FILE" =~ '^[$]HOME' ]]; then
# if CREDENTIAL_FILE does not start with $HOME or the home directory, prepend it
if [[ ! "$CREDENTIAL_FILE" =~ ^\$HOME && ! "$CREDENTIAL_FILE" =~ ^~ ]]; then
CREDENTIAL_FILE="$HOME/$CREDENTIAL_FILE"
fi
echo "CREDENTIAL_FILE=$CREDENTIAL_FILE"
Expand Down
2 changes: 1 addition & 1 deletion lint/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ inputs:
terraform-cli-config-file:
required: false
description: Relative path to the terraform cli config file
default: .terraformrc
default: $HOME/.terraformrc
s3-bucket-name:
required: false
description: S3 bucket name to cache dependencies to speed up runs.
Expand Down

0 comments on commit 47c56f8

Please sign in to comment.