Skip to content

Instantly share code, notes, and snippets.

@bharatmicrosystems
Created July 18, 2021 07:17
Show Gist options
  • Save bharatmicrosystems/4ea805f006a7b9b559d1722a920ded2d to your computer and use it in GitHub Desktop.
Save bharatmicrosystems/4ea805f006a7b9b559d1722a920ded2d to your computer and use it in GitHub Desktop.
name: Create Kubernetes Cluster and Install Argo
on: push
jobs:
deploy-terraform:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./terraform
steps:
- uses: actions/checkout@v2
- name: Install Terraform
id: install-terraform
run: wget -O terraform.zip https://releases.hashicorp.com/terraform/0.15.3/terraform_0.15.3_linux_amd64.zip && unzip terraform.zip && chmod +x terraform && sudo mv terraform /usr/local/bin
- name: Apply Terraform
id: apply-terraform
run: sed -i "s/<project-id>/${{ secrets.PROJECT_ID }}/g" main.tf && terraform init && terraform apply -auto-approve -var="project_id=${{ secrets.PROJECT_ID }}"
env:
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment