Skip to content

Commit

Permalink
Update terraform.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
sumanmanna134 authored Sep 20, 2024
1 parent a0f3adc commit c0eba35
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@ jobs:
terraform:
name: 'Build Azure Infra'
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: ./azure
permissions:
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Terraform Setup
uses: hashicorp/setup-terraform@v2
uses: hashicorp/setup-terraform@v1
with:
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}

Expand All @@ -42,5 +46,5 @@ jobs:
run: exit 1

- name: Terraform Apply
if: steps.plan.outcome == 'success'
if: github.ref == 'refs/heads/main' && github.event_name == 'push' && steps.plan.outcome == 'success'
run: cd azure && terraform apply -auto-approve -input=false

0 comments on commit c0eba35

Please sign in to comment.