Skip to content

Bump actions/setup-python from 5 to 6 #12

Bump actions/setup-python from 5 to 6

Bump actions/setup-python from 5 to 6 #12

Workflow file for this run

name: Plan
on:
workflow_dispatch:
pull_request:
branches:
- main
jobs:
static:
name: Plan
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Terraform Setup
uses: hashicorp/setup-terraform@v3
- name: Restore Terraform Cache
uses: actions/cache/restore@v4
with:
path: |
.terraform
.terraform.lock.hcl
key: terraform
- name: Terraform Init
env:
TF_TOKEN_app_terraform_io: ${{ secrets.TF_TOKEN_app_terraform_io }}
run: terraform init -input=false
- name: Save Terraform Cache
uses: actions/cache/save@v4
with:
path: |
.terraform
.terraform.lock.hcl
key: terraform
- name: Restore Defaults Cache
uses: actions/cache/restore@v4
with:
path: defaults.yaml
key: defaults
- name: Terraform Plan
id: plan
env:
TF_TOKEN_app_terraform_io: ${{ secrets.TF_TOKEN_app_terraform_io }}
ACI_URL: ${{ secrets.ACI_URL }}
ACI_USERNAME: ${{ secrets.ACI_USERNAME }}
ACI_PASSWORD: ${{ secrets.ACI_PASSWORD }}
run: terraform plan -input=false -no-color
- name: Add Pull Request Comment
uses: actions/github-script@v7
env:
PLAN: "terraform\n${{ steps.plan.outputs.stdout }}"
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const output = `#### Terraform Plan\`${{ steps.plan.outcome }}\`
<details><summary>Show Plan</summary>
\`\`\`\n
${process.env.PLAN}
\`\`\`
</details>
*Pusher: @${{ github.actor }}*`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: output
})