forked from bcgov/startup-sample-project-aws-containers
-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (35 loc) · 1.05 KB
/
deploy-dev.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
42
43
name: Deploy Dev
on:
workflow_run:
workflows:
- Push
types:
- completed
env:
IMAGE_ID: ${{ secrets.AWS_ECR_URI }}
TF_VERSION: 1.0.5
TG_VERSION: 0.31.4
TG_SRC_PATH: terraform
TFC_WORKSPACE: dev
jobs:
cd:
name: cd
runs-on: ubuntu-20.04
if: ${{ github.event.workflow_run.conclusion == 'success' }}
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:
app_image: ${{ env.IMAGE_ID }}:${{ github.event.workflow_run.head_sha }}
run: terragrunt apply-all --terragrunt-non-interactive