Skip to content

Commit

Permalink
ci: create infra pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
LionelLalande authored Oct 12, 2023
1 parent c4cc92a commit 787320c
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/infra.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
on:
workflow_dispatch:
pull_request:
branches: ["main"]
paths: ["infra"]
paths-ignore: ["infra/.azure-pipelines"]
push:
branches: ["main"]
paths: ["infra"]
paths-ignore: ["infra/.azure-pipelines"]

jobs:
build:
runs-on: ubuntu-latest
steps:

- name: Install TF
uses: hashicorp/setup-terraform@v2.0.3
with:
terraform_version: latest

- name: Initialize TF
run: terraform init --backend-config=${{ secrets.TF_BACKEND }}
working-directory: 'infra/provisioning'

- name: Validate TF
run: terraform validate --backend-config=${{ secrets.TF_BACKEND }}
working-directory: 'infra/provisioning'

- name: Plan TF
uses: Pwd9000-ML/terraform-azurerm-plan@v1.2.6
with:
path: 'infra/provisioning'
tf_vars_file: ${{ secrets.TF_VARS }}
az_resource_group: ''
az_container_name: ''

- name: Apply TF
uses: Pwd9000-ML/terraform-azurerm-apply@v1.2.6
if: github.event_name != 'pull_request'
with:
az_resource_group: ''
az_container_name: ''

0 comments on commit 787320c

Please # to comment.