chore: add ops cluster #249
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Terraform | |
on: | |
push: | |
paths: | |
- "*.tf" | |
branches: | |
- "*" | |
pull_request: | |
types: | |
- opened | |
env: | |
TF_VAR_ARGOCD_SERVER: "argocd.naturalselectionlabs.com:443" | |
TF_VAR_ARGOCD_PASSWORD: ${{ secrets.TF_VAR_ARGOCD_PASSWORD }} | |
TF_VAR_PAT: ${{ secrets.TF_VAR_PAT }} | |
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }} | |
jobs: | |
terraform: | |
name: "Terraform" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: hashicorp/setup-terraform@v2 | |
- name: Init | |
run: terraform init | |
- name: Plan | |
id: plan | |
run: terraform plan | |
- name: Terraform Apply | |
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
run: terraform apply -auto-approve -input=false |