Update neuroagent #428
Workflow file for this run
This file contains hidden or 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: Auto - Apply changes on Merge to staging | |
# only trigger on pull request closed events | |
on: | |
pull_request: | |
types: [ closed ] | |
branches: | |
- staging | |
jobs: | |
terraform_apply: | |
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true | |
environment: ${{ github.base_ref }} | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
TF_VAR_ec_apikey2: ${{ secrets.ELASTIC_CLOUD_API_KEY2 }} # Second, new elastic cloud instance of the new AWS org | |
TF_VAR_nise_dockerhub_password: ${{ secrets.NISE_DOCKERHUB_PASS }} | |
runs-on: ubuntu-latest | |
name: Auto Apply terraform code to staging | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Configure Terraform | |
uses: hashicorp/setup-terraform@v3 | |
- name: Initialize Terraform | |
run: terraform init -backend-config="./${{ github.base_ref }}.config" | |
- name: Run Terraform Apply | |
run: | | |
terraform apply -auto-approve -var-file="${{ github.ref_name }}.tfvars" |