Skip to content

Commit

Permalink
Add workflow_dispatch trigger for terraform apply (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
driazati committed Jun 14, 2022
1 parent 09c5f7d commit 2b270bc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/terraform_apply.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: terraform
name: terraform apply
on:
push:
branches:
- main
paths:
- terraform/**

workflow_dispatch:

concurrency:
group: terraform_apply
Expand All @@ -25,10 +25,19 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Terraform Apply
if: github.ref == 'refs/heads/main'
if: ${{ github.ref == 'refs/heads/main' && github.event_name != 'workflow_dispatch' }}
uses: dflook/terraform-apply@e1c1b7e1d0eed8bda30338e54ff3cd6790a6f35b #v1.25.1
with:
var_file: |
terraform/vars/tvm-ci-prod.auto.tfvars
workspace: tvm-ci-prod
path: ./terraform
- name: Terraform Apply (workflow dispatch)
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'workflow_dispatch' }}
uses: dflook/terraform-apply@e1c1b7e1d0eed8bda30338e54ff3cd6790a6f35b #v1.25.1
with:
var_file: |
terraform/vars/tvm-ci-prod.auto.tfvars
workspace: tvm-ci-prod
path: ./terraform
auto_approve: true
2 changes: 1 addition & 1 deletion .github/workflows/terraform_plan.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: terraform
name: terraform plan
on:
pull_request:
branches:
Expand Down

0 comments on commit 2b270bc

Please sign in to comment.