Skip to content

Commit

Permalink
fix decryption shell (#281)
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 authored Aug 26, 2024
1 parent 7f76466 commit 15d999f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tf_sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ jobs:
arg_backend_config: ${{ contains(matrix.dir, 'bucket') && format('backend/{0}.tfbackend', matrix.env) || '' }}
arg_var_file: ${{ contains(matrix.dir, 'instance') && format('env/{0}.tfvars', matrix.env) || '' }}
arg_workspace: ${{ matrix.env }}
encrypt_passphrase: ${{ secrets.TF_ENCRYPTION }}
arg_or_create: true
cache_plugins: true
encrypt_passphrase: ${{ secrets.TF_ENCRYPTION }}
2 changes: 1 addition & 1 deletion action.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ module.exports = async ({ context, core, exec, github }) => {

// Decrypt the TF plan file if encrypted.
if (process.env.encrypt_passphrase) {
await exec.exec("/bin/bash", ["TEMP_FILE=$(mktemp)"]);
await exec.exec("/bin/bash", ["-c", "TEMP_FILE=$(mktemp)"]);
await exec.exec("printf", ["%s", process.env.encrypt_passphrase, `> "$TEMP_FILE"`]);
await exec.exec("openssl", [
"enc",
Expand Down

0 comments on commit 15d999f

Please sign in to comment.