Skip to content

Commit

Permalink
fix: auto-approve input
Browse files Browse the repository at this point in the history
Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com>
  • Loading branch information
rdhar committed Oct 11, 2024
1 parent 1b1050c commit 369726d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion action.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ module.exports = async ({ context, core, exec, github }) => {
// TF apply.
if (process.env.arg_command === "apply") {
// Download the TF plan file if not auto-approved.
if (!/^true$/i.test(process.env.arg_auto_approve)) {
if (!/^true$/i.test(process.env.arg_auto_approve_raw)) {
// TF plan anew for later comparison if plan_parity is enabled.
if (/^true$/i.test(process.env.plan_parity)) {
await exec_tf(
Expand Down
1 change: 1 addition & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ runs:

# TF arguments.
arg_auto_approve: ${{ inputs.arg_auto_approve != '' && format('-auto-approve={0}', inputs.arg_auto_approve) || '' }}
arg_auto_approve_raw: ${{ inputs.arg_auto_approve }}
arg_backend: ${{ inputs.arg_backend != '' && format('-backend={0}', inputs.arg_backend) || '' }}
arg_backend_config: ${{ inputs.arg_backend_config != '' && format('-backend-config={0}', inputs.arg_backend_config) || '' }}
arg_backup: ${{ inputs.arg_backup != '' && format('-backup={0}', inputs.arg_backup) || '' }}
Expand Down

0 comments on commit 369726d

Please sign in to comment.