From 9eaebade6944b06d4129a1fa367f596ebb2e9c83 Mon Sep 17 00:00:00 2001 From: talithafrsc Date: Thu, 24 Oct 2024 17:36:18 +0700 Subject: [PATCH] add terraform testing to CI --- github-actions.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 github-actions.yml diff --git a/github-actions.yml b/github-actions.yml new file mode 100644 index 000000000..c15deb507 --- /dev/null +++ b/github-actions.yml @@ -0,0 +1,18 @@ +name: CI +on: + push: + branches: [ dev ] +jobs: + terraform-test: + runs-on: ubuntu-latest + container: cedricguadalupe/terraform-gcloud + steps: + - name: Set GCP project + run: gcloud config set project $PROJECT_ID + - name: Setup GCP authentication + run: echo "$BASE64_ENV_VAR" | base64 --decode > output_file.txt + - run: gcloud auth activate-service-account --key-file output_file.txt + - name: Initiate Terraform + run: terraform init + - name: Dry run Terraform + run: terraform plan \ No newline at end of file