Skip to content

Commit

Permalink
Use arg for file path
Browse files Browse the repository at this point in the history
  • Loading branch information
dflook committed Jan 8, 2024
1 parent ae876a7 commit e36159d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions image/actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ function detect-terraform-version() {
TERRAFORM_VER_MINOR=$(echo "$TF_VERSION" | cut -d. -f2)
TERRAFORM_VER_PATCH=$(echo "$TF_VERSION" | cut -d. -f3)

terraform version
terraform version > "$STEP_TMP_DIR/terraform_version.stdout"
cat "$STEP_TMP_DIR/terraform_version.stdout"

if terraform version | grep --quiet OpenTofu; then
if grep --quiet OpenTofu "$STEP_TMP_DIR/terraform_version.stdout"; then
export TOOL_PRODUCT_NAME="OpenTofu"
export TOOL_COMMAND_NAME="tofu"
else
Expand Down
2 changes: 1 addition & 1 deletion image/src/github_pr_comment/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def is_approved(proposed_plan: str, comment: TerraformComment) -> bool:
return plan_cmp(proposed_plan, comment.body)

def is_approved_binary_plan(plan_path: str, comment: TerraformComment) -> bool:
return plan_out_hash(os.environ['PLAN_OUT'], comment.issue_url) == comment.headers['plan_out_hash']
return plan_out_hash(plan_path, comment.issue_url) == comment.headers['plan_out_hash']

def truncate(text: str, max_size: int, too_big_message: str) -> str:
lines = []
Expand Down

0 comments on commit e36159d

Please sign in to comment.