Skip to content

Commit

Permalink
Merge pull request #109 from dflook/plan_output
Browse files Browse the repository at this point in the history
Add plan output to workflow log
  • Loading branch information
dflook authored Oct 13, 2021
2 parents 1b9f8ca + 8c91971 commit f1fcd7a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ When using an action you can specify the version as:
- `@v1.17` to use the latest patch release for the specific minor version
- `@v1` to use the latest patch release for the specific major version

## Unreleased

### Fixed
- Add `terraform plan` output that was missing from the workflow log

## [1.17.1] - 2021-10-06

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions image/actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@ function random_string() {

function write_credentials() {
format_tf_credentials >>"$HOME/.terraformrc"
chown -R --reference "$HOME" "$HOME/.terraformrc"
chown --reference "$HOME" "$HOME/.terraformrc"
netrc-credential-actions >>"$HOME/.netrc"
chown -R --reference "$HOME" "$HOME/.netrc"
chown --reference "$HOME" "$HOME/.netrc"

chmod 700 /.ssh
if [[ -v TERRAFORM_SSH_KEY ]]; then
Expand Down
3 changes: 3 additions & 0 deletions image/entrypoints/plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ if [[ $PLAN_EXIT -eq 1 ]]; then
fi
fi

cat "$STEP_TMP_DIR/plan.txt"
cat "$STEP_TMP_DIR/terraform_plan.stderr"

if [[ "$GITHUB_EVENT_NAME" == "pull_request" || "$GITHUB_EVENT_NAME" == "issue_comment" || "$GITHUB_EVENT_NAME" == "pull_request_review_comment" || "$GITHUB_EVENT_NAME" == "pull_request_target" || "$GITHUB_EVENT_NAME" == "pull_request_review" ]]; then
if [[ "$INPUT_ADD_GITHUB_COMMENT" == "true" || "$INPUT_ADD_GITHUB_COMMENT" == "changes-only" ]]; then

Expand Down

0 comments on commit f1fcd7a

Please sign in to comment.