Skip to content

Commit

Permalink
fix: fix credential file location
Browse files Browse the repository at this point in the history
  • Loading branch information
greenkiwi committed Dec 2, 2024
1 parent 948ff89 commit 0ce6ff5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion auth/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ runs:
run: |
CREDENTIAL_FILE="${{ inputs.terraform-cli-config-file }}"
# if CREDENTIAL_FILE does not start with $HOME, prepend it
if [[ ! "$CREDENTIAL_FILE" =~ '^\$HOME' ]]; then
echo "CREDENTIAL_FILE=$CREDENTIAL_FILE"
if [[ ! "$CREDENTIAL_FILE" =~ '^[$]HOME' ]]; then
CREDENTIAL_FILE="$HOME/$CREDENTIAL_FILE"
fi
echo "CREDENTIAL_FILE=$CREDENTIAL_FILE"
if [[ -f "$CREDENTIAL_FILE" ]]; then
echo "file-created=false" >> $GITHUB_OUTPUT
echo "Terraform credentials already present, skipping."
Expand Down

0 comments on commit 0ce6ff5

Please sign in to comment.