forked from bcgov/startup-sample-project-aws-containers
-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (34 loc) · 1.03 KB
/
deploy-sandbox.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Deploy Sandbox
on:
push:
branches: [master]
paths:
- ".github/workflows/deploy-sandbox.yaml"
- "terraform/terragrunt.hcl"
- "terraform/sandbox/**"
env:
TF_VERSION: 1.0.5
TG_VERSION: 0.31.4
TG_SRC_PATH: terraform
TFC_WORKSPACE: sandbox
jobs:
cd:
name: cd
runs-on: ubuntu-20.04
steps:
- name: Check out the repo
uses: actions/checkout@v2
with:
ref: ${{ github.event.workflow_run.head_branch }}
- uses: hashicorp/setup-terraform@v1
with:
terraform_version: ${{ env.TF_VERSION }}
cli_config_credentials_token: ${{ secrets.TFC_TEAM_TOKEN }}
- uses: peter-murray/[email protected]
with:
terragrunt_version: ${{ env.TG_VERSION }}
- name: Terragrunt Apply
working-directory: ${{ env.TG_SRC_PATH }}/${{ env.TFC_WORKSPACE }}
env:
AWS_ACCOUNTS_ECR_READ_ACCESS: ${{ secrets.AWS_ACCOUNTS_ECR_READ_ACCESS }}
run: terragrunt apply-all --terragrunt-non-interactive