Skip to content

Commit

Permalink
Update terraform-plan.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
arnol377 committed Aug 9, 2024
1 parent da3ce6c commit ef9e462
Showing 1 changed file with 26 additions and 27 deletions.
53 changes: 26 additions & 27 deletions .github/workflows/terraform-plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ jobs:
# The type of runner that the job will run on
runs-on: [ aws-image-pipeline ]
env:
AWS_SECRET_ACCESS_KEY: "wqpZLFlqar+aghonhyAIR6vTBSpHQTquus8hhmw9"
AWS_ACCESS_KEY_ID: "ASIATK6SR2K2ZKK54P7T"
AWS_SESSION_TOKEN: "IQoJb3JpZ2luX2VjECkaDXVzLWdvdi1lYXN0LTEiRzBFAiEA1AF7X7KwAwiEIWX0tdgZ0Dj7WwyJY12CxpRMt0nTqD4CIEp/8teAzKXZ2Ubv0WlxyMAguYMeqcQEkl2C4n9PrVtdKpcDCEYQABoMMjI5Njg1NDQ5Mzk3IgymBfPpRUAHOBE8k9Qq9ALnD8WNSq9b/fsTxgm61jmZIrjBm2SBSzHhciEGKcrJZdKTN43jPQLaVgOtZkG1D3wpr16RjEU2YzwarNMvJqasUWf4UH/oa+qztms/IKD9fSDeODkaYWVRZ0q9fS7i7dM57MNTFnCDB8T+cFurRTGNQFtT/ZY8S1Mdr4NASuturYpIDwpkDgB8nG2nvECQvR/u93Ut4Fz0FPoWmNXn/ibG9bbLHd1IMek2H+so97MppHlT6svSvInZEtvV4cSa2YQrTzLDeFn04vUNjEfjI68H+zXxTojt61ZTbUvTvo/ZH9siVDjXmx+sQceam1KDVl9k+cyoN7rzPhRoRVHf/vcm94hk58l0Vla+ndMJn5OTBmXueeWmplr8JM28v6MnqhEjn1l6uuZoiwEcv5O0DssfnC6IX57RSEQC7n0YCk0pzdMrSHMfQF0tUJIJJFMXOeM2RXmXYRofbMH+kmKtaapkGDa+C9Mx4WXBmd9O8IIcl0Ed5Rwwh/PYtQY6pgEjhf9jUxJfyKVM+qo6y1CYGNgAf4tGJJ4FiTns6KPFT8xLdot74AoTT9vg7mXdFRYGZetQAQxDS4/MqPKdejqkOANgdVtspQujDqsSTh+9PmIYjya4DFzTvar3/qVGrc0imgrZdbSFDNWjFNptblBgNnYW545HpQ+NnREHb9AmHoAVQ5k5uWFAhKmaS7d9ceNo5VDR59CU1v5jqO8EWQ0Nme1wOIef"


AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SESSION_TOKEN: "${{ secrets.AWS_SESSION_TOKEN }}"

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand Down Expand Up @@ -59,33 +58,33 @@ jobs:
PLAN: "terraform\n${{ steps.plan.outputs.stdout }}"
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
const output = `#### Terraform Format and Style 🖌\`${{ steps.fmt.outcome }}\`
#### Terraform Initialization ⚙️\`${{ steps.init.outcome }}\`
#### Terraform Validation 🤖\`${{ steps.validate.outcome }}\`
<details><summary>Validation Output</summary>
script: |
const output = `#### Terraform Format and Style 🖌\`${{ steps.fmt.outcome }}\`
#### Terraform Initialization ⚙️\`${{ steps.init.outcome }}\`
#### Terraform Validation 🤖\`${{ steps.validate.outcome }}\`
<details><summary>Validation Output</summary>
\`\`\`\n
${{ steps.validate.outputs.stdout }}
\`\`\`
\`\`\`\n
${{ steps.validate.outputs.stdout }}
\`\`\`
</details>
</details>
#### Terraform Plan 📖\`${{ steps.plan.outcome }}\`
#### Terraform Plan 📖\`${{ steps.plan.outcome }}\`
<details><summary>Show Plan</summary>
<details><summary>Show Plan</summary>
\`\`\`\n
${process.env.PLAN}
\`\`\`
\`\`\`\n
${process.env.PLAN}
\`\`\`
</details>
</details>
*Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`, Working Directory: \`${{ env.tf_actions_working_dir }}\`, Workflow: \`${{ github.workflow }}\`*`;
*Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`, Working Directory: \`${{ env.tf_actions_working_dir }}\`, Workflow: \`${{ github.workflow }}\`*`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: output
})
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: output
})

0 comments on commit ef9e462

Please sign in to comment.