Skip to content

Commit

Permalink
chore: save plan outcome to an intermediate variable [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
xiehan authored Dec 20, 2023
1 parent 3e49216 commit 00ad128
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/diff-cdktf-stacks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ jobs:
terraform plan -no-color | tee ../../../plan_stdout_${{ matrix.stack }}.txt; echo $?
set +o pipefail
continue-on-error: true
- name: Save results into a variable
id: plan_outcome
run: echo "value=${{steps.plan.outcome}}" >> $GITHUB_OUTPUT
- name: Comment the plan output on the PR
if: contains(github.event_name, 'pull_request') # pull_request or pull_request_target
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
Expand All @@ -66,7 +69,7 @@ jobs:
stackName: "${{matrix.stack}}"
})
- name: Fail this check if the plan was not successful
if: ${{ steps.plan.outcome }} != 'success'
if: ${{ steps.plan_outcome.outputs.value }} != 'success'
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
Expand Down

0 comments on commit 00ad128

Please sign in to comment.