Skip to content

Commit

Permalink
pr comment tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnaab committed Feb 26, 2025
1 parent 7917b66 commit e6f9b88
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/_terraform-plan-pr-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,15 @@ jobs:
echo "stack_name=$(jq -r 'keys[0]' outputs.json)" >> $GITHUB_OUTPUT
- name: Generate Terraform plan
id: generate_terraform_plan
working-directory: infra/cdktf/cdktf.out/stacks/${{ steps.get_stack_name.outputs.stack_name }}
run: |
terraform plan -out=tfplan -input=false
terraform show tfplan > tfplan.txt
terraform show tfplan > pr-comment.txt
- name: Add comment to PR with Terraform plan
uses: marocchino/sticky-pull-request-comment@v2
with:
path: tfplan.txt
header: "Terraform Plan for ${{ steps.get_stack_name.outputs.stack_name }}"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
header: terraform-plan
path: pr-comment.txt

0 comments on commit e6f9b88

Please sign in to comment.