only terraform #107
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: QA | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- nenad/800-run-qa-from-git | |
jobs: | |
run-malachite-do: | |
runs-on: ubuntu-latest | |
env: | |
TF_VAR_do_token: "${{ secrets.DO_TOKEN }}" | |
TF_VAR_ssh_keys: '["${{ secrets.DO_SSH_FINGERPRINT }}"]' | |
TF_VAR_nyc1: 1 | |
TF_VAR_nyc3: 1 | |
TF_VAR_fra1: 1 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install parallel-ssh and create symlink | |
run: | | |
sudo apt-get update && sudo apt-get install -y pssh | |
sudo ln /usr/bin/parallel-ssh /usr/bin/pssh | |
pssh --version | |
- name: Set up Terraform | |
uses: hashicorp/setup-terraform@v2 | |
with: | |
terraform_version: 1.10.5 | |
- name: Terraform Init | |
working-directory: qa/terraform | |
run: terraform init | |
- name: Terraform Apply (Provision Nodes) | |
working-directory: qa/terraform | |
run: terraform apply -auto-approve | |
#- name: Setup commands | |
# working-directory: qa/terraform | |
# run: | | |
# source commands.sh && deploy_cc | |
- name: Terraform Destroy (Cleanup Nodes) | |
if: always() | |
working-directory: qa/terraform | |
run: terraform destroy -auto-approve |