Skip to content

Commit

Permalink
add pat and plan output
Browse files Browse the repository at this point in the history
  • Loading branch information
AyodeAwe committed Nov 25, 2024
1 parent d28b016 commit d31d2f9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/deploy-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ jobs:

- name: Terraform Plan
working-directory: terraform
run: terraform plan -out=tfplan -var="deployment_version=${{ env.DEPLOY_VERSION }}"
run: |
terraform plan -out=tfplan -var="deployment_version=${{ env.DEPLOY_VERSION }}"
terraform show -no-color tfplan > plan.txt
echo "PLAN=$(cat plan.txt)" >> $GITHUB_ENV
env:
TF_VAR_app_id: ${{ secrets.APP_ID }}
TF_VAR_webhook_secret: ${{ secrets.WEBHOOK_SECRET }}
Expand All @@ -96,9 +99,10 @@ jobs:
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.JAWE_PAT }}
script: |
const output = `#### Terraform Plan 📝
\`\`\`\n
\`\`\`hcl\n
${process.env.PLAN}
\`\`\`
`;
Expand Down

0 comments on commit d31d2f9

Please sign in to comment.