no message #2
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: DEPLOY_Infrastructure | |
on: | |
push: | |
branches: ["**"] | |
paths: | |
- .github/workflows/deploy-infrastructure.yaml | |
- infrastructure/** | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download code | |
uses: actions/checkout@v3 | |
- id: 'auth' | |
name: 'Authenticate to Google Cloud' | |
uses: 'google-github-actions/auth@v1' | |
with: | |
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}' | |
token_format: 'access_token' | |
- name: Configure terraform | |
uses: hashicorp/setup-terraform@v2 | |
- name: Init terraform modules | |
run: terraform init | |
working-directory: infrastructure | |
- name: Execute a plan for terraform | |
run: terraform plan | |
working-directory: infrastructure | |
- name: Apply terraform manifests | |
run: terraform apply -auto-approve | |
working-directory: infrastructure | |