Merge apply with plan
This commit is contained in:
parent
0a1960a891
commit
68fc0dc1e0
2 changed files with 11 additions and 24 deletions
|
@ -1,23 +0,0 @@
|
||||||
name: Terraform Deploy
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_run:
|
|
||||||
workflows: ["plan.yaml"]
|
|
||||||
types:
|
|
||||||
- completed
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
env:
|
|
||||||
TF_IN_AUTOMATION: true
|
|
||||||
TF_CLI_ARGS: "-no-color"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
apply:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: hashicorp/setup-terraform@v3
|
|
||||||
- name: Terraform apply
|
|
||||||
id: apply
|
|
||||||
run: terraform apply -auto-approve tfplan
|
|
|
@ -1,4 +1,4 @@
|
||||||
name: Terraform Plan
|
name: Terraform Plan and Apply
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
@ -87,3 +87,13 @@ jobs:
|
||||||
body: output
|
body: output
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
apply:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: plan
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: hashicorp/setup-terraform@v3
|
||||||
|
- name: Terraform apply
|
||||||
|
id: apply
|
||||||
|
run: terraform apply -auto-approve tfplan
|
Loading…
Add table
Add a link
Reference in a new issue